('Set logger with logging/colorlog automatically',)
Project description
Modlog
Get module logger with environment variables
Environment variables
modlog using environment variables
If module name: a.b.c, the environment variable is:
{A}_LOG_LEVEL
values are compatible with logging module, following values are supported:
- notset
- debug
- info
- warning
- error
- critical
{
50: 'CRITICAL',
40: 'ERROR',
30: 'WARNING',
20: 'INFO',
10: 'DEBUG',
0: 'NOTSET'
}
Example
import modlog
logger = modlog.getLogger(__name__) # This will read environment variables and set logger level
logger.info("a")
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
modlog-0.0.1.tar.gz
(2.8 kB
view hashes)
Built Distributions
modlog-0.0.1-py3.6.egg
(4.2 kB
view hashes)
Close
Hashes for modlog-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 720f63574ebc2b94ea1b716c5a1e2c907dce3b1860f02eb13d4f4ae904f2908c |
|
MD5 | 3661579bd1fb408c9147f7a3a49316d3 |
|
BLAKE2b-256 | 396c948b65d3bf9011f5098c22712c660955a3f3d33b11521436abbf62c855da |