Closed 1zg12 closed 4 years ago
Thank you but for reasons I put into https://github.com/Pylons/waitress/issues/298#issuecomment-630240957, this PR just doesn't serve a purpose if you configure logging the way you want it in your application.
Any application interfacing with libraries that use the stdlib logging module should always configure logging in some way - either via basicConfig, dictConfig, fileConfig, or even some more imperative form. If done properly, the basicConfig invoked by waitress is already a no-op.
Issue
Fixes: #298
Background
At the moment,
waitress
would always set up the root logger withlogging.basicConfig()
.There are two major kinds of issue could be generated:
Unnecessary waitress noise
wairtess
could print out a lot of messages, which for most of the cases, it's not really necessary for the application.Interference with application logging
As it has configured the root logger, which would generate additional unintended log output.
Changes
This will give users an option to disable the root logger logging configure, and leave the
_quiet
as it is, so that certain information could still be printed out.Ref
https://github.com/Pylons/waitress/issues/151 https://github.com/Pylons/waitress/issues/235
Note
There is another workaround to turn off the logging of
waitress
completely by using the_quiet
parameter, ref: https://github.com/Pylons/waitress/issues/133#issuecomment-629992140However, since it's said as
test shim
, I am proposing to add a new parameter here. Thanks.