diff options
author | Ivan Alejandro <ivanalejandro0@gmail.com> | 2015-06-12 14:34:18 -0300 |
---|---|---|
committer | Ivan Alejandro <ivanalejandro0@gmail.com> | 2015-06-22 15:52:37 -0300 |
commit | 32658ae3108bc67a102cf6e0153d468b3a8ae1b0 (patch) | |
tree | a0c70c2e19c9484210c132af35a80342d937290f /src/leap/bitmask/services/eip/vpnprocess.py | |
parent | 584a6d93ad1fe1ba46929108f002a16a8b70e95d (diff) |
[feat] replace old log handler with new one
Replace logging.getLogger with custom get_logger.
Remove some unneeded dependencies and reorder other.
Diffstat (limited to 'src/leap/bitmask/services/eip/vpnprocess.py')
-rw-r--r-- | src/leap/bitmask/services/eip/vpnprocess.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/leap/bitmask/services/eip/vpnprocess.py b/src/leap/bitmask/services/eip/vpnprocess.py index 3e46418c..586b50f5 100644 --- a/src/leap/bitmask/services/eip/vpnprocess.py +++ b/src/leap/bitmask/services/eip/vpnprocess.py @@ -18,7 +18,6 @@ VPN Manager, spawned in a custom processProtocol. """ import commands -import logging import os import shutil import socket @@ -39,6 +38,7 @@ except ImportError: from leap.bitmask.config import flags from leap.bitmask.config.providerconfig import ProviderConfig +from leap.bitmask.logs.utils import get_logger from leap.bitmask.services.eip import get_vpn_launcher from leap.bitmask.services.eip import linuxvpnlauncher from leap.bitmask.services.eip.eipconfig import EIPConfig @@ -47,13 +47,12 @@ from leap.bitmask.util import first, force_eval from leap.bitmask.platform_init import IS_MAC, IS_LINUX from leap.common.check import leap_assert, leap_assert_type -logger = logging.getLogger(__name__) -vpnlog = logging.getLogger('leap.openvpn') - from twisted.internet import defer, protocol, reactor from twisted.internet import error as internet_error from twisted.internet.task import LoopingCall +logger = get_logger() + class VPNObserver(object): """ @@ -884,7 +883,7 @@ class VPNProcess(protocol.ProcessProtocol, VPNManager): """ # truncate the newline line = data[:-1] - vpnlog.info(line) + logger.info(line) self._vpn_observer.watch(line) def processExited(self, reason): |