keep log of current session

This commit is contained in:
j 2015-03-07 19:17:12 +05:30
parent 75c713cc33
commit 6bdd789b26
2 changed files with 5 additions and 5 deletions

View file

@ -44,13 +44,12 @@ def run():
setup.create_db()
PID = sys.argv[2] if len(sys.argv) > 2 else None
#FORMAT = '%(asctime)-15s %(clientip)s %(user)-8s %(message)s'
#logging.basicConfig(format=FORMAT)
#logger = logging.getLogger('oml.app')
#logger.warning('test')
if not PID:
logging.basicConfig(level=logging.DEBUG)
else:
logging.basicConfig(level=logging.DEBUG,
filename=settings.log_path, filemode='w',
format='%(asctime)s %(levelname)s %(message)s')
options = {
'debug': False,
'gzip': True

View file

@ -18,6 +18,7 @@ if not os.path.exists(config_path):
os.makedirs(config_path)
db_path = os.path.join(config_path, 'data.db')
log_path = os.path.join(config_path, 'debug.log')
icons_db_path = os.path.join(config_path, 'icons.db')
key_path = os.path.join(config_path, 'node.key')
ssl_cert_path = os.path.join(config_path, 'node.ssl.crt')