('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.2.tar.gz
(2.9 kB
view details)
Built Distribution
File details
Details for the file modlog-0.0.2.tar.gz
.
File metadata
- Download URL: modlog-0.0.2.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4a3b1cea6702e90bec83339d5ec8eba9c71e406b49ac1c98779208da59e2cbc |
|
MD5 | 8a95293b1c2d525fe8236bb21232c13f |
|
BLAKE2b-256 | fa624fb2e5e0500387fbbd32597fc112be7bbacbfafa3c33417588eb05f9c0db |
Provenance
File details
Details for the file modlog-0.0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: modlog-0.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dff8891368d75c5140f27d68c1995546601c6a6af155e5972e33b7e4bd819cd |
|
MD5 | 85428dfc8c0aa45113883f8371318ac1 |
|
BLAKE2b-256 | d741e9b788809e20ff8ce220b0719693fff3ce2f73e9f2021c50848fba6bc3ca |