diff options
Diffstat (limited to 'src/leap/bitmask/util')
-rw-r--r-- | src/leap/bitmask/util/autostart.py | 4 | ||||
-rw-r--r-- | src/leap/bitmask/util/keyring_helpers.py | 5 | ||||
-rw-r--r-- | src/leap/bitmask/util/polkit_agent.py | 4 | ||||
-rw-r--r-- | src/leap/bitmask/util/privilege_policies.py | 4 | ||||
-rw-r--r-- | src/leap/bitmask/util/requirement_checker.py | 6 |
5 files changed, 11 insertions, 12 deletions
diff --git a/src/leap/bitmask/util/autostart.py b/src/leap/bitmask/util/autostart.py index d7a8afb8..2000b9f5 100644 --- a/src/leap/bitmask/util/autostart.py +++ b/src/leap/bitmask/util/autostart.py @@ -17,14 +17,14 @@ """ Helpers to enable/disable bitmask's autostart. """ -import logging import os from leap.bitmask.config import flags +from leap.bitmask.logs.utils import get_logger from leap.bitmask.platform_init import IS_LINUX from leap.common.files import mkdir_p -logger = logging.getLogger(__name__) +logger = get_logger() DESKTOP_ENTRY = """\ diff --git a/src/leap/bitmask/util/keyring_helpers.py b/src/leap/bitmask/util/keyring_helpers.py index 2b729b65..d81f39b1 100644 --- a/src/leap/bitmask/util/keyring_helpers.py +++ b/src/leap/bitmask/util/keyring_helpers.py @@ -17,8 +17,6 @@ """ Keyring helpers. """ -import logging - try: import keyring from keyring.backends.file import EncryptedKeyring, PlaintextKeyring @@ -35,7 +33,8 @@ except Exception: keyring = None -logger = logging.getLogger(__name__) +from leap.bitmask.logs.utils import get_logger +logger = get_logger() def _get_keyring_with_fallback(): diff --git a/src/leap/bitmask/util/polkit_agent.py b/src/leap/bitmask/util/polkit_agent.py index e512bffa..f6c7b4ca 100644 --- a/src/leap/bitmask/util/polkit_agent.py +++ b/src/leap/bitmask/util/polkit_agent.py @@ -17,14 +17,14 @@ """ Daemonizes polkit authentication agent. """ -import logging import os import subprocess import daemon # TODO --- logger won't work when daemoninzed. Log to syslog instead? -logger = logging.getLogger(__name__) +from leap.bitmask.logs.utils import get_logger +logger = get_logger() POLKIT_PATHS = ( '/usr/lib/lxpolkit/lxpolkit', diff --git a/src/leap/bitmask/util/privilege_policies.py b/src/leap/bitmask/util/privilege_policies.py index 2acc63cf..fd8c7c8e 100644 --- a/src/leap/bitmask/util/privilege_policies.py +++ b/src/leap/bitmask/util/privilege_policies.py @@ -19,7 +19,6 @@ Helpers to determine if the needed policies for privilege escalation are operative under this client run. """ import commands -import logging import os import subprocess import platform @@ -28,10 +27,11 @@ import time from abc import ABCMeta, abstractmethod from leap.bitmask.config import flags +from leap.bitmask.logs.utils import get_logger from leap.common.check import leap_assert from leap.common.files import which -logger = logging.getLogger(__name__) +logger = get_logger() class NoPolkitAuthAgentAvailable(Exception): diff --git a/src/leap/bitmask/util/requirement_checker.py b/src/leap/bitmask/util/requirement_checker.py index 37e8e693..99ef81b4 100644 --- a/src/leap/bitmask/util/requirement_checker.py +++ b/src/leap/bitmask/util/requirement_checker.py @@ -18,9 +18,7 @@ """ Utility to check the needed requirements. """ - import os -import logging from pkg_resources import (DistributionNotFound, get_distribution, @@ -28,7 +26,9 @@ from pkg_resources import (DistributionNotFound, resource_stream, VersionConflict) -logger = logging.getLogger(__name__) +from leap.bitmask.logs.utils import get_logger + +logger = get_logger() def get_requirements(): |