-
-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional logging #122
Optional logging #122
Conversation
@Aeron reading again #101, I am actually a bit confused on the aim of this. If the aim is to prevent Granian to log, then this won't change that. If the aim is to prevent Granian to alter the root config of the logging level, then this is correct, but I would change the naming, as WDYT? |
In my case, I’m happy when the worker is not emitting log records, especially in stdin/stderr. Yet I can introduce As far as I can see, all relevant logging from Rust code goes through Will it be a suitable solution? Or did I misinterpret what you meant? |
Actually As far as I remember, |
Yeah, I clearly was too fast to suggest the As for |
Okay, the So, Granian’s inner logger names start with Therefore, the simplest way to turn off logging for all @gi0baro what do you think? |
Makes sense to me. |
Done and done 👍 |
Adds `--log`/`--no-log` option to CLI. Adds the relevant argument to the Granian server class and its spawn methods. Updates README with the relevant CLI option.
Updates logging configuration functionality with an argument to disable logging (by lowering the logger logging level beyond critical). Reverts server module related changes.
Alters server’s logging related argument names for the sake of more consistent naming.
Adds help description for logging enable option. Fixes single-quote formatting.
2bbc07e
to
a8ba938
Compare
a8ba938
to
6410a22
Compare
This PR adds the
--log
/--no-log
option to CLI and the same argument to the Granian server class. The default value isenabled
/True
, so there are no backward compatibility changes. The option/argument simply allows to opt-out from logging to be configured and emit anything.Thus, it resolves #101.
Does it look suitable? Don’t hesitate to give any feedback.