mirror of
https://github.com/niess/python-appimage.git
synced 2025-07-21 04:41:14 +02:00
24 lines
389 B
Python
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)
|