Python Module logging Operations: Difference between revisions
Jump to navigation
Jump to search
Line 6: | Line 6: | ||
<font color=darkkhaki>Python does not seem to have an interpreter command line option to use to set the logging level.</font> | <font color=darkkhaki>Python does not seem to have an interpreter command line option to use to set the logging level.</font> | ||
Make this part of your application. Parse -v|--verbose, -d|--debug, etc on command line and then set <code>logging.basicConfig(level=parsed_ogging_level)</code> in <code>main()</code>. | Make this part of your application. Parse <code>-v|--verbose</code>, <code>-d|--debug</code>, etc on command line and then set <code>logging.basicConfig(level=parsed_ogging_level)</code> in <code>main()</code>. |
Latest revision as of 16:34, 26 May 2023
Internal
Overview
Configure Logging Level Externally
Python does not seem to have an interpreter command line option to use to set the logging level.
Make this part of your application. Parse -v|--verbose
, -d|--debug
, etc on command line and then set logging.basicConfig(level=parsed_ogging_level)
in main()
.