No project description provided
Project description
Log files are generated based on the time and the latest n logs are automatically retained
Example
import logging
import logging_timehandler
logger = logging.getLogger(__name__)
handler = logging_timehandler.TimeHandler('./log/%Y_%m_%d/%Y_%m_%d_%S.txt', retain=5)
handler.setFormatter(logging.Formatter(logging.BASIC_FORMAT))
logger.addHandler(handler)
logger.setLevel(logging.INFO)
for i in range(10):
logger.info('hello')
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
Built Distribution
Close
Hashes for logging_timehandler-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ab856e4d41c813b88ef31ef9a039616fb8efe606ea0527d9081c0572670b770 |
|
MD5 | 8abf7cc1a1bd5558eeac87419ddaadae |
|
BLAKE2b-256 | eea6e844522b8c6052eb1e7061cef6692ced7d7035c83feb7111f88daf491974 |
Close
Hashes for logging_timehandler-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 451c4334d055b9fe9ad544e318f2272276e9e3a0434d3a333cb11f61864746be |
|
MD5 | b5f7d636e5c9c1c948b7894f1c69038f |
|
BLAKE2b-256 | 8254465ff4c9d57683438b80f86db507c686ca1004f219f424ca3638fa3dcfa9 |