summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-09-05 07:59:35 +0900
committerkali <kali@leap.se>2012-09-05 07:59:35 +0900
commit535e584ba978a7a234a52df14f89197fbc3cea14 (patch)
treeb2b728f3f8a0bcab74979cea5f2fe2f277a30f69
parent813a97957572aad97d50319db96b55a74b8ed307 (diff)
openvpn messages log to eip.openvpn logger
so we can get them to file / stdout even if our log viewer is not launched.
-rw-r--r--src/leap/baseapp/eip.py1
-rw-r--r--src/leap/baseapp/log.py8
2 files changed, 7 insertions, 2 deletions
diff --git a/src/leap/baseapp/eip.py b/src/leap/baseapp/eip.py
index e0da63a2..856cb197 100644
--- a/src/leap/baseapp/eip.py
+++ b/src/leap/baseapp/eip.py
@@ -130,7 +130,6 @@ class EIPConductorApp(object):
#XXX how to wait on pkexec???
#something better that this workaround, plz!!
time.sleep(5)
- #print('errors. disconnect.')
logger.debug('timeout')
logger.error('errors. disconnect')
self.start_or_stopVPN() # is stop
diff --git a/src/leap/baseapp/log.py b/src/leap/baseapp/log.py
index 0c98eb94..3580e987 100644
--- a/src/leap/baseapp/log.py
+++ b/src/leap/baseapp/log.py
@@ -1,6 +1,10 @@
+import logging
+
from PyQt4 import QtGui
from PyQt4 import QtCore
+vpnlogger = logging.getLogger('leap.openvpn')
+
class LogPane(object):
"""
@@ -56,5 +60,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)