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:
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.
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
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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b486d85e6ab36777edb4a109ed8222633c6ecd0ee7379973aa9498d37d577e5 |
|
MD5 | 5d21766003708f13922ed8b6f19321c8 |
|
BLAKE2b-256 | d3c24baaa39ff2ff1ed7ae823834239134a0ba9411ba6a722bf772d60c23e6d8 |
Close
Hashes for ems_simple_logger_config-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee4b7b2af1e35cdac37ec1fa754bb462af1936bbcb45ae9c5939cf05d803011d |
|
MD5 | 66daff9cfb72d271e0918e4849b6fe4d |
|
BLAKE2b-256 | dcdd3204e04db2e8a00bbd4676fcabb1532c8c64a214cb1c623e8f7fae3e9225 |