A simple file logger configuration for Python
Project description
ems-simple-logger-config
This is a simple (file) logger configuration for Python.
Installation:
pip install ems-simple-logger-config
On app level: Initialize logger with default values to get a common console output:
from logger import logger
log = logger.setup_logger()
log.info('Some text')
On app level: Alternatively initialize logger with some configuration. If file_name is added a log file will be created.
from logger import logger
log = logger.setup_logger(logger_name = 'SomeLoggerName', log_level = logging.DEBUG, file_name = 'log.txt')
log.info('Some text')
On module level get the logger by
from logger import logger
log = logger.get_logger(__name__)
log.info('Some text')
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 ems-simple-logger-config-0.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac94788e76386964cfdebe019857410db5d8000bfa160190d3e3bcc87370b280 |
|
MD5 | c7f344d9ff8cd98d6c2da74f492015a9 |
|
BLAKE2b-256 | 506bef3ef5be7b6bccdfe8e9b3079073e1dba5e80c817de879d1301c239768d6 |
Close
Hashes for ems_simple_logger_config-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25dc852b7385812a42ce0320b742f650af3daf3f28d21a061f309572d861c9dd |
|
MD5 | cd8834940c7a5cfbe41dac4d3c94d38a |
|
BLAKE2b-256 | f7ecd0d1b9c237449aeabc43631f004c22d2883e944ec5eef98d1d5067477cf4 |