summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/leap/bitmask/vpn/management.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/leap/bitmask/vpn/management.py b/src/leap/bitmask/vpn/management.py
index 0665169b..753f7435 100644
--- a/src/leap/bitmask/vpn/management.py
+++ b/src/leap/bitmask/vpn/management.py
@@ -25,7 +25,7 @@ from collections import OrderedDict
from twisted.protocols.basic import LineReceiver
from twisted.internet.defer import Deferred
-from twisted.python import log
+from twisted.logger import Logger
from zope.interface import Interface
@@ -40,6 +40,8 @@ class IStateListener(Interface):
class ManagementProtocol(LineReceiver):
+ log = Logger()
+
def __init__(self, verbose=False):
self.verbose = verbose
@@ -117,8 +119,9 @@ class ManagementProtocol(LineReceiver):
self._linebuf.append(line)
def _handle_unknown(self, infotype, data):
- log.msg('Received unhandled infotype %s with data %s' %
- (infotype, data))
+ self.log.msg(
+ 'Received unhandled infotype %s with data %s' %
+ (infotype, data))
def _handle_BYTECOUNT(self, data):
down, up = data.split(',')
@@ -160,7 +163,7 @@ class ManagementProtocol(LineReceiver):
raise ValueError(
'Cannot parse state data! %s' % data)
except Exception as exc:
- log.error('Failure parsing data: %s' % exc)
+ self.log.error('Failure parsing data: %s' % exc)
return
if state != self.state: