From a2804c3de1470db98d8c6aa8a01e2de1aa1718a1 Mon Sep 17 00:00:00 2001 From: kali Date: Wed, 5 Sep 2012 07:42:10 +0900 Subject: app wide logging handler --- src/leap/baseapp/leap_app.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/leap/baseapp/leap_app.py') diff --git a/src/leap/baseapp/leap_app.py b/src/leap/baseapp/leap_app.py index def95da1..85644360 100644 --- a/src/leap/baseapp/leap_app.py +++ b/src/leap/baseapp/leap_app.py @@ -1,7 +1,11 @@ +import logging + from PyQt4 import QtGui from leap.gui import mainwindow_rc +logger = logging.getLogger(name=__name__) + class MainWindow(object): """ @@ -79,5 +83,7 @@ technolust") # TODO:make sure to shutdown all child process / threads # in conductor # XXX send signal instead? + logger.info('Shutting down') self.conductor.cleanup() + logger.info('Exiting') QtGui.qApp.quit() -- cgit v1.2.3 From 8148bc9c8c113c41fcb18b397669b1f13447c653 Mon Sep 17 00:00:00 2001 From: kali Date: Thu, 6 Sep 2012 02:27:04 +0900 Subject: more generic error handler in EipConductorAppMixin documentation of the Exception Hierarchy and attributes. also a bit of general cleanup around error handling in conductor. Hopefully to be polished an abstracted to leap.base with time. not all errors are converted (and the old with_errors/ignoring errors) are still there, but we should be using this style of handlers from now on. wrapping up with this pseudo-feature for now. as we work on individual features we can mimick the exceptions that are working. --- src/leap/baseapp/leap_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/leap/baseapp/leap_app.py') diff --git a/src/leap/baseapp/leap_app.py b/src/leap/baseapp/leap_app.py index 85644360..f91b2329 100644 --- a/src/leap/baseapp/leap_app.py +++ b/src/leap/baseapp/leap_app.py @@ -7,7 +7,7 @@ from leap.gui import mainwindow_rc logger = logging.getLogger(name=__name__) -class MainWindow(object): +class MainWindowMixin(object): """ create the main window for leap app -- cgit v1.2.3