From ef494325484fce56f27a08dced3690159294bd7f Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Wed, 11 Jul 2012 20:06:33 +0200 Subject: [PATCH] fixed bug 1023522 (OpenLP does not start in debug mode) Fixes: https://launchpad.net/bugs/1023522 --- openlp/core/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openlp/core/__init__.py b/openlp/core/__init__.py index 4ed411ec1..13c344367 100644 --- a/openlp/core/__init__.py +++ b/openlp/core/__init__.py @@ -207,6 +207,7 @@ class OpenLP(QtGui.QApplication): else: return QtGui.QApplication.event(self, event) + def set_up_logging(log_path): """ Setup our logging using log_path @@ -217,6 +218,9 @@ def set_up_logging(log_path): logfile.setFormatter(logging.Formatter( u'%(asctime)s %(name)-55s %(levelname)-8s %(message)s')) log.addHandler(logfile) + if log.isEnabledFor(logging.DEBUG): + print 'Logging to:', filename + def main(args=None): """ @@ -247,7 +251,6 @@ def main(args=None): qt_args = [] if options.loglevel.lower() in ['d', 'debug']: log.setLevel(logging.DEBUG) - print 'Logging to:', filename elif options.loglevel.lower() in ['w', 'warning']: log.setLevel(logging.WARNING) else: