easy log use for extra infos
Project description
log
pip install xlog
from logext666 import xlog
xlog.file = 'logs/%Y-%m-%d.log'
xlog.level = 'info'
xlog.format = '%(levelname)s %(name)s %(user)s %(message)s'
xlog.file = '%Y-%m-%d.html'
xlog.debug({'foo': 'bar'}, indent=2)
xlog.info("hello", extra={'user': 'hanzhichao'})
output:
2019-12-09 19:30:16,419 DEBUG log None ->
{
"foo": "bar"
}
2019-12-09 19:30:16,419 INFO log hanzhichao hello
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
logz-0.11.tar.gz
(3.9 kB
view hashes)