summaryrefslogtreecommitdiff
path: root/src/leap/baseapp/log.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-09-06 02:34:40 +0900
committerkali <kali@leap.se>2012-09-06 02:34:40 +0900
commitbd26d30f34104898dd6c5314dee688e27c82529b (patch)
tree226ed4f238369f8937c28e3d0f11258cbfb7b506 /src/leap/baseapp/log.py
parent6ef92e257ce1e605194cb26ff6cb804c7d2c3418 (diff)
parent8148bc9c8c113c41fcb18b397669b1f13447c653 (diff)
Merge branch 'feature/error-handling' into develop
Closes #504: design generic error handling solution. * app-wide logging config. * --logfile command line argument. * created basic exception hierarchy * conductor pushes exceptions to error queue * in Qt, error dialogs are created from exception attributes
Diffstat (limited to 'src/leap/baseapp/log.py')
-rw-r--r--src/leap/baseapp/log.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/leap/baseapp/log.py b/src/leap/baseapp/log.py
index 0c98eb94..8a7f81c3 100644
--- a/src/leap/baseapp/log.py
+++ b/src/leap/baseapp/log.py
@@ -1,8 +1,12 @@
+import logging
+
from PyQt4 import QtGui
from PyQt4 import QtCore
+vpnlogger = logging.getLogger('leap.openvpn')
+
-class LogPane(object):
+class LogPaneMixin(object):
"""
a simple log pane
that writes new lines as they come
@@ -18,7 +22,6 @@ class LogPane(object):
self.logbrowser = QtGui.QTextBrowser()
startStopButton = QtGui.QPushButton("&Connect")
- #startStopButton.clicked.connect(self.start_or_stopVPN)
self.startStopButton = startStopButton
logging_layout.addWidget(self.logbrowser)
@@ -56,5 +59,7 @@ class LogPane(object):
"""
simple slot: writes new line to logger Pane.
"""
+ msg = line[:-1]
if self.debugmode:
- self.logbrowser.append(line[:-1])
+ self.logbrowser.append(msg)
+ vpnlogger.info(msg)