Description Usage Arguments Details Examples
basicConfig
and logReset
provide a way to put the logging package
in a know initial state.
1 2 3 | basicConfig(level = 20)
logReset()
|
level |
The logging level of the root logger. Defaults to INFO. Please do notice that this has no effect on the handling level of the handler that basicConfig attaches to the root logger. |
basicConfig
creates the root logger, attaches a console handler(by
basic.stdout name) to it and sets the level of the handler to
level
. You must not call basicConfig
to for logger to work any more:
then root logger is created it gets initialized by default the same way as
basicConfig
does. If you need clear logger to fill with you own handlers
use logReset
to remove all default handlers.
logReset
reinitializes the whole logging system as if the package had just been
loaded except it also removes all default handlers. Typically, you would want to call
basicConfig
immediately after a call to logReset
.
1 2 3 4 5 | basicConfig()
logdebug("not shown, basic is INFO")
logwarn("shown and timestamped")
logReset()
logwarn("not shown, as no handlers are present after a reset")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.