UNKNOWN
Project description
The zc.loggermonitor package provides a zc.monitor plugin for getting and setting logger levels.
>>> import sys, zc.loggermonitor
It is an error to call the monitor without user arguments.
>>> zc.loggermonitor.level(sys.stdout) Traceback (most recent call last): ... TypeError: level() takes at least 2 arguments (1 given)
If you pass it a logger name, it returns the current effective level:
>>> zc.loggermonitor.level(sys.stdout, '.') NOTSET >>> zc.loggermonitor.level(sys.stdout, 'mylogger') NOTSET
If you pass a level it sets the level:
>>> zc.loggermonitor.level(sys.stdout, '.', 'INFO')>>> zc.loggermonitor.level(sys.stdout, '.') INFO >>> zc.loggermonitor.level(sys.stdout, 'mylogger') INFO
You can also pass a numeric value:
>>> zc.loggermonitor.level(sys.stdout, 'mylogger', '5') >>> zc.loggermonitor.level(sys.stdout, '.') INFO >>> zc.loggermonitor.level(sys.stdout, 'mylogger') Level 5>>> zc.loggermonitor.level(sys.stdout, 'mylogger', '10') >>> zc.loggermonitor.level(sys.stdout, '.') INFO >>> zc.loggermonitor.level(sys.stdout, 'mylogger') DEBUG>>> zc.loggermonitor.level(sys.stdout, 'mylogger', 'NOTSET') >>> zc.loggermonitor.level(sys.stdout, '.') INFO >>> zc.loggermonitor.level(sys.stdout, 'mylogger') INFO>>> zc.loggermonitor.level(sys.stdout, '.', 'NOTSET') >>> zc.loggermonitor.level(sys.stdout, '.') NOTSET >>> zc.loggermonitor.level(sys.stdout, 'mylogger') NOTSET
Download
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zc.loggermonitor-0.1.tar.gz
(2.8 kB
view details)
File details
Details for the file zc.loggermonitor-0.1.tar.gz
.
File metadata
- Download URL: zc.loggermonitor-0.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d0e47150c8674733267c647df837838c19a6d8b32534f4f4b43ff3a80dca176 |
|
MD5 | 906c3f2b8a841453a2832e87dbc534c3 |
|
BLAKE2b-256 | 5b2d3963a7c95b2088ef60da6433c07809b73eb83d54a35eaa2af222d3f8edc5 |