diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-10-03 15:16:51 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-10-03 15:16:51 +0000 |
commit | a999cb905cd4d7f8a533b6695ce884611966a2f2 (patch) | |
tree | 4f218120db837e74aa14a637545d4d5beb00ed94 /ick_controller.py | |
parent | d3e67515cc61c80b5f3ac9954f776b6ade7179fa (diff) | |
download | ick2-a999cb905cd4d7f8a533b6695ce884611966a2f2.tar.gz |
Add: more logging via syslog at startup
Diffstat (limited to 'ick_controller.py')
-rw-r--r-- | ick_controller.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ick_controller.py b/ick_controller.py index 64717be..be9c23f 100644 --- a/ick_controller.py +++ b/ick_controller.py @@ -59,15 +59,20 @@ logger = logging.getLogger() logger.setLevel(logging.DEBUG) handler = logging.handlers.SysLogHandler(address='/dev/log') logger.addHandler(handler) -logging.info('Starting ick controller') +logging.info('Starting ick controller main program') config_filename = os.environ.get('ICK_CONTROLLER_CONFIG') +logging.info('config filename %r' % config_filename) if not config_filename: logging.error('no ICK_CONTROLLER_CONFIG in environment') raise Exception('No ICK_CONTROLLER_CONFIG defined in environment') +logging.info('reading config from %r' % config_filename) config = load_config(config_filename, default_config) + +logging.info('config is %r' % config) ick2.setup_logging(config) + ick2.log.log('info', msg_text='Ick2 controller starts', config=config) api = ick2.ControllerAPI() api.set_state_directory(config['statedir']) |