From 535e584ba978a7a234a52df14f89197fbc3cea14 Mon Sep 17 00:00:00 2001 From: kali Date: Wed, 5 Sep 2012 07:59:35 +0900 Subject: openvpn messages log to eip.openvpn logger so we can get them to file / stdout even if our log viewer is not launched. --- src/leap/baseapp/eip.py | 1 - src/leap/baseapp/log.py | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src/leap') 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) -- cgit v1.2.3