From a999cb905cd4d7f8a533b6695ce884611966a2f2 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Tue, 3 Oct 2017 15:16:51 +0000 Subject: Add: more logging via syslog at startup --- ick_controller.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ick_controller.py') 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']) -- cgit v1.2.1