diff options
Diffstat (limited to 'start_mx.py')
-rwxr-xr-x | start_mx.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/start_mx.py b/start_mx.py index 7e154da..bf3dddb 100755 --- a/start_mx.py +++ b/start_mx.py @@ -55,6 +55,7 @@ if __name__ == "__main__": debug = opts.debug config_file = opts.config + logfile = opts.log_file if debug: level = logging.DEBUG @@ -73,6 +74,13 @@ if __name__ == "__main__": console.setFormatter(formatter) logger.addHandler(console) + if logfile is not None: + logger.debug('Setting logfile to %s ', logfile) + fileh = logging.FileHandler(logfile) + fileh.setLevel(logging.DEBUG) + fileh.setFormatter(formatter) + logger.addHandler(fileh) + logger.info("~~~~~~~~~~~~~~~~~~~") logger.info(" LEAP MX") logger.info("~~~~~~~~~~~~~~~~~~~") |