Source code for gloopy.util.log

import logging
from os.path import basename, splitext
import sys

[docs]def init_log(): ''' Initialise stdlib logging. ''' # TODO, should create log file in application's scratch space, not in cwd app_name = splitext(basename(sys.argv[0]))[0] logging.basicConfig( filename='%s-debug.log' % (app_name,), filemode='w', level=logging.DEBUG, )