You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently proselint writes non-essential information onto stout. This is caused by using the print() function for those messages. For example, the following message
Using in-memory shelf for cache file /home/users/malbert/.cache/proselint/checks.airlinese.misc.check
print('Using in-memory shelf for cache file %s'%cachepath)
This makes proselint excessively verbose on large projects and there is no way to circumvent this.
On typical CLI applications it is possible to redirect stderr somewhere else, for example I would expect to be able to do this:
proselint my_file.rst 2>/dev.null
to get only the important messages. Even better, I would expect to use something like a -q/--quiet flag instead.
By using the logging framework in Python the first point is automatic because log-messages are written by default to stderr.
The "quiet" flag is then also trivial to implement as one could just increase the log-level, for example:
if quiet:
logging.getLogger().setLevel(logging.ERROR)
As it is now, I am forced to run proselint through a couple of negative grep calls to filter out everything I don't want to see. This is cumbersome, error prone and risks accidentally filtering out too much.
By having a "quiet" flag (or simply using logging and thus writing to stderr) would make this a lot easier and make the output much more readable.
The text was updated successfully, but these errors were encountered:
Currently
proselint
writes non-essential information ontostout
. This is caused by using theprint()
function for those messages. For example, the following messageis cause by
proselint/proselint/tools.py
Line 81 in ea8c574
This makes
proselint
excessively verbose on large projects and there is no way to circumvent this.On typical CLI applications it is possible to redirect
stderr
somewhere else, for example I would expect to be able to do this:to get only the important messages. Even better, I would expect to use something like a
-q/--quiet
flag instead.By using the
logging
framework in Python the first point is automatic because log-messages are written by default tostderr
.The "quiet" flag is then also trivial to implement as one could just increase the log-level, for example:
As it is now, I am forced to run proselint through a couple of negative
grep
calls to filter out everything I don't want to see. This is cumbersome, error prone and risks accidentally filtering out too much.By having a "quiet" flag (or simply using logging and thus writing to stderr) would make this a lot easier and make the output much more readable.
The text was updated successfully, but these errors were encountered: