demos/demobase.py
author Radek Brich <radek.brich@devl.cz>
Wed, 26 Mar 2014 21:26:39 +0100
changeset 92 b97c4e25ed6d
child 96 68c562e0eb1f
permissions -rw-r--r--
Configure logging for demos.

import sys
sys.path.append('..')

import logging

# Setup logging
logger = logging.getLogger('tuikit')
logger.setLevel(logging.DEBUG)
handler = logging.FileHandler(filename='tuikit.log')
handler.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s %(name)s %(levelname)s %(message)s')
handler.setFormatter(formatter)
logger.addHandler(handler)