debug is optional and can be env var

pull/106/head
Jeff Culverhouse 11 months ago
parent b4e9825c16
commit fa18a8340c

@ -64,7 +64,7 @@ except:
config['version'] = version config['version'] = version
config['configpath'] = os.path.dirname(configpath) config['configpath'] = os.path.dirname(configpath)
if 'timezone' not in config: config['timezone'] = 'UTC' if 'timezone' not in config: config['timezone'] = 'UTC'
if 'debug' not in config: config['debug'] = False if 'debug' not in config: config['debug'] = os.getenv('DEBUG') or False
logging.basicConfig( logging.basicConfig(
format = '%(asctime)s.%(msecs)03d [%(levelname)s] %(name)s: %(message)s' if config['hide_ts'] == False else '[%(levelname)s] %(name)s: %(message)s', format = '%(asctime)s.%(msecs)03d [%(levelname)s] %(name)s: %(message)s' if config['hide_ts'] == False else '[%(levelname)s] %(name)s: %(message)s',

@ -26,4 +26,3 @@ amcrest:
timezone: America/New_York timezone: America/New_York
hide_ts: False hide_ts: False
debug: False
Loading…
Cancel
Save