A simple yet fancy logger for Python scripts
- Using pip:
pip install lgg
- Using Poetry:
poetry add lgg
# This way
from lgg import logger
# Or
from lgg import get_logger
logger = get_logger()
# End Or
logger.info('This is an info message')
logger.debug('Debugging message')
logger.error('error message')
logger.warning('File not found! An empty one is created')
from lgg import get_logger
logger = get_logger('python-logger')
logger.info('This is an info message')
logger.debug('Debugging message')
logger.error('error message')
logger.warning('File not found! An empty one is created')
Notice the change after each log's datetime, the former shows the filename and line of code, the latter displays the logger name instead