Files
python-appimage/python_appimage/log.py
Valentin Niess dc3acadb9a Initial commit
2020-03-29 11:59:23 +02:00

24 lines
389 B
Python

import logging
__all__ = ['debug', 'log']
# Configure the logger
logging.basicConfig(
format='[%(asctime)s] %(message)s',
level=logging.INFO
)
def log(task, fmt, *args):
'''Log a standard message
'''
logging.info('%-8s ' + fmt, task, *args)
def debug(task, fmt, *args):
'''Report some debug information
'''
logging.debug('%-8s ' + fmt, task, *args)