nithir revised this gist . Go to revision
3 files changed, 12 insertions
basic.py(file created)
| @@ -0,0 +1,2 @@ | |||
| 1 | + | import logging | |
| 2 | + | logging.basicConfig(level=logging.DEBUG) | |
classic.py(file created)
| @@ -0,0 +1,8 @@ | |||
| 1 | + | import logging | |
| 2 | + | # https://docs.python.org/3/howto/logging.html#configuring-logging-for-a-library | |
| 3 | + | logging.getLogger('foo').addHandler(logging.NullHandler()) | |
| 4 | + | logger = logging.getLogger(__name__) | |
| 5 | + | logger.debug('This is a test log message.') | |
| 6 | + | ||
| 7 | + | import logging | |
| 8 | + | logging.basicConfig(level=logging.DEBUG) | |
upip.py(file created)
| @@ -0,0 +1,2 @@ | |||
| 1 | + | import upip | |
| 2 | + | upip.install(logging) | |