keep log of current session
This commit is contained in:
parent
75c713cc33
commit
6bdd789b26
2 changed files with 5 additions and 5 deletions
|
@ -44,13 +44,12 @@ def run():
|
||||||
setup.create_db()
|
setup.create_db()
|
||||||
PID = sys.argv[2] if len(sys.argv) > 2 else None
|
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:
|
if not PID:
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
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 = {
|
options = {
|
||||||
'debug': False,
|
'debug': False,
|
||||||
'gzip': True
|
'gzip': True
|
||||||
|
|
|
@ -18,6 +18,7 @@ if not os.path.exists(config_path):
|
||||||
os.makedirs(config_path)
|
os.makedirs(config_path)
|
||||||
|
|
||||||
db_path = os.path.join(config_path, 'data.db')
|
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')
|
icons_db_path = os.path.join(config_path, 'icons.db')
|
||||||
key_path = os.path.join(config_path, 'node.key')
|
key_path = os.path.join(config_path, 'node.key')
|
||||||
ssl_cert_path = os.path.join(config_path, 'node.ssl.crt')
|
ssl_cert_path = os.path.join(config_path, 'node.ssl.crt')
|
||||||
|
|
Loading…
Reference in a new issue