feat: mute many log.info and log.success #2771
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are too many information on the screen as Jina running, it creates the following problems:
Very scary to new users.
Feel heavy. To be honest, every program (even assembly) feel super heavy if you print every line on the screen.
Too loud, belittle user. As a framework, loud log outputs gives user a impression that, "what you are building & output is insignificant, because I'm emitting a looot and they are more important! So please read my output and good luck of finding your output."
In the screenshot below (readme code snippet), the user own log output is in the redbox, take a look at the ratio there. All the other lines in the screenshot are emitted from Jina. Don't you think it is completely overwhelming?
Another argument, when we write
with open('a.txt') as fp:
fp.write()
do we see the console logs like the following?
fp is opened successfully!
fp is written with some blah
fp is now closed
No. Then why would Jina do that?
I think 2.0 is the right time to make some INFO level log to DEBUG and only emit when necessary. This does not only give user a cleaner console, but also
❤️ really put user's code/logic as the first priority
🧊 makes our framework as transparent as Python
:unicorn_face: shows the confidence of ourself -> we are shipping robust code, we know the framework behavior without printing every line on the screen.
One may argue that, "oh, then it may slow down our own development." It won't, you just add export JINA_LOG_LEVEL=DEBUG to bashrc.
┆Issue is synchronized with this Asana task by Unito