summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/services/eip
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/services/eip')
-rw-r--r--src/leap/bitmask/services/eip/conductor.py5
-rw-r--r--src/leap/bitmask/services/eip/darwinvpnlauncher.py4
-rw-r--r--src/leap/bitmask/services/eip/eipbootstrapper.py4
-rw-r--r--src/leap/bitmask/services/eip/eipconfig.py3
-rw-r--r--src/leap/bitmask/services/eip/linuxvpnlauncher.py4
-rw-r--r--src/leap/bitmask/services/eip/vpnlauncher.py4
-rw-r--r--src/leap/bitmask/services/eip/vpnprocess.py9
-rw-r--r--src/leap/bitmask/services/eip/windowsvpnlauncher.py5
8 files changed, 18 insertions, 20 deletions
diff --git a/src/leap/bitmask/services/eip/conductor.py b/src/leap/bitmask/services/eip/conductor.py
index 3fc88724..3386dddf 100644
--- a/src/leap/bitmask/services/eip/conductor.py
+++ b/src/leap/bitmask/services/eip/conductor.py
@@ -20,10 +20,9 @@ EIP Conductor module.
This handles Qt Signals and triggers the calls to the backend,
where the VPNProcess has been initialized.
"""
-import logging
-
from PySide import QtCore
+from leap.bitmask.logs.utils import get_logger
from leap.bitmask.gui import statemachines
from leap.bitmask.services import EIP_SERVICE
from leap.bitmask.services import get_service_display_name
@@ -31,7 +30,7 @@ from leap.bitmask.services.eip.connection import EIPConnection
from leap.bitmask.platform_init import IS_MAC
QtDelayedCall = QtCore.QTimer.singleShot
-logger = logging.getLogger(__name__)
+logger = get_logger()
class EIPConductor(object):
diff --git a/src/leap/bitmask/services/eip/darwinvpnlauncher.py b/src/leap/bitmask/services/eip/darwinvpnlauncher.py
index f83e0170..17fc11c2 100644
--- a/src/leap/bitmask/services/eip/darwinvpnlauncher.py
+++ b/src/leap/bitmask/services/eip/darwinvpnlauncher.py
@@ -19,15 +19,15 @@ Darwin VPN launcher implementation.
"""
import commands
import getpass
-import logging
import os
import sys
+from leap.bitmask.logs.utils import get_logger
from leap.bitmask.services.eip.vpnlauncher import VPNLauncher
from leap.bitmask.services.eip.vpnlauncher import VPNLauncherException
from leap.bitmask.util import get_path_prefix
-logger = logging.getLogger(__name__)
+logger = get_logger()
class EIPNoTunKextLoaded(VPNLauncherException):
diff --git a/src/leap/bitmask/services/eip/eipbootstrapper.py b/src/leap/bitmask/services/eip/eipbootstrapper.py
index f78113bc..7a331d71 100644
--- a/src/leap/bitmask/services/eip/eipbootstrapper.py
+++ b/src/leap/bitmask/services/eip/eipbootstrapper.py
@@ -17,11 +17,11 @@
"""
EIP bootstrapping
"""
-import logging
import os
from leap.bitmask.config.providerconfig import ProviderConfig
from leap.bitmask.crypto.certs import download_client_cert
+from leap.bitmask.logs.utils import get_logger
from leap.bitmask.services import download_service_config
from leap.bitmask.services.abstractbootstrapper import AbstractBootstrapper
from leap.bitmask.services.eip.eipconfig import EIPConfig
@@ -29,7 +29,7 @@ from leap.common import certs as leap_certs
from leap.common.check import leap_assert, leap_assert_type
from leap.common.files import check_and_fix_urw_only
-logger = logging.getLogger(__name__)
+logger = get_logger()
class EIPBootstrapper(AbstractBootstrapper):
diff --git a/src/leap/bitmask/services/eip/eipconfig.py b/src/leap/bitmask/services/eip/eipconfig.py
index d5947eb1..b1d08393 100644
--- a/src/leap/bitmask/services/eip/eipconfig.py
+++ b/src/leap/bitmask/services/eip/eipconfig.py
@@ -26,12 +26,13 @@ import ipaddr
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 import ServiceConfig
from leap.bitmask.services.eip.eipspec import get_schema
from leap.bitmask.util import get_path_prefix
from leap.common.check import leap_assert, leap_assert_type
-logger = logging.getLogger(__name__)
+logger = get_logger()
def get_eipconfig_path(domain, relative=True):
diff --git a/src/leap/bitmask/services/eip/linuxvpnlauncher.py b/src/leap/bitmask/services/eip/linuxvpnlauncher.py
index a3ab408b..cf14a8f9 100644
--- a/src/leap/bitmask/services/eip/linuxvpnlauncher.py
+++ b/src/leap/bitmask/services/eip/linuxvpnlauncher.py
@@ -18,11 +18,11 @@
Linux VPN launcher implementation.
"""
import commands
-import logging
import os
import sys
from leap.bitmask.config import flags
+from leap.bitmask.logs.utils import get_logger
from leap.bitmask.util.privilege_policies import LinuxPolicyChecker
from leap.bitmask.util.privilege_policies import NoPolkitAuthAgentAvailable
from leap.bitmask.util.privilege_policies import NoPkexecAvailable
@@ -31,7 +31,7 @@ from leap.bitmask.services.eip.vpnlauncher import VPNLauncherException
from leap.bitmask.util import get_path_prefix, force_eval
from leap.bitmask.util import first
-logger = logging.getLogger(__name__)
+logger = get_logger()
COM = commands
diff --git a/src/leap/bitmask/services/eip/vpnlauncher.py b/src/leap/bitmask/services/eip/vpnlauncher.py
index 7793d624..c48f857c 100644
--- a/src/leap/bitmask/services/eip/vpnlauncher.py
+++ b/src/leap/bitmask/services/eip/vpnlauncher.py
@@ -19,7 +19,6 @@ Platform independant VPN launcher interface.
"""
import getpass
import hashlib
-import logging
import os
import stat
@@ -27,6 +26,7 @@ from abc import ABCMeta, abstractmethod
from functools import partial
from leap.bitmask.config import flags
+from leap.bitmask.logs.utils import get_logger
from leap.bitmask.backend.settings import Settings, GATEWAY_AUTOMATIC
from leap.bitmask.config.providerconfig import ProviderConfig
from leap.bitmask.platform_init import IS_LINUX
@@ -35,7 +35,7 @@ from leap.bitmask.util import force_eval
from leap.common.check import leap_assert, leap_assert_type
-logger = logging.getLogger(__name__)
+logger = get_logger()
class VPNLauncherException(Exception):
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):
diff --git a/src/leap/bitmask/services/eip/windowsvpnlauncher.py b/src/leap/bitmask/services/eip/windowsvpnlauncher.py
index 3f1ed43b..aaa3e45f 100644
--- a/src/leap/bitmask/services/eip/windowsvpnlauncher.py
+++ b/src/leap/bitmask/services/eip/windowsvpnlauncher.py
@@ -17,12 +17,11 @@
"""
Windows VPN launcher implementation.
"""
-import logging
-
+from leap.bitmask.logs.utils import get_logger
from leap.bitmask.services.eip.vpnlauncher import VPNLauncher
from leap.common.check import leap_assert
-logger = logging.getLogger(__name__)
+logger = get_logger()
class WindowsVPNLauncher(VPNLauncher):