mirror of
https://github.com/niess/python-appimage.git
synced 2026-03-14 12:20:14 +01:00
Clean the package layout
This commit is contained in:
23
python_appimage/utils/log.py
Normal file
23
python_appimage/utils/log.py
Normal file
@@ -0,0 +1,23 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user