Skip to content
Snippets Groups Projects
Commit a98b4896 authored by Alexander Kreft's avatar Alexander Kreft
Browse files

MAINT: Rename static logger names to __name__

parent 7c09c4de
Branches
Tags
2 merge requests!33MAINT: change arguments of create_user,!26F loggers name
Pipeline #13782 passed
......@@ -36,7 +36,7 @@ from caosdb.exceptions import LoginFailedError
# meta class compatible with Python 2 *and* 3:
ABC = ABCMeta('ABC', (object, ), {'__slots__': ()})
_LOGGER = logging.getLogger("authentication")
_LOGGER = logging.getLogger(__name__)
class AbstractAuthenticator(ABC):
......
......@@ -60,7 +60,7 @@ except ImportError:
# pylint: disable=missing-docstring
_LOGGER = logging.getLogger("connection")
_LOGGER = logging.getLogger(__name__)
class _WrappedHTTPResponse(CaosDBHTTPResponse):
......
......@@ -65,4 +65,6 @@ def test_subclass_configure():
def test_plain_has_logger():
p = PlainTextCredentialsProvider()
assert hasattr(p, "logger")
assert p.logger.name == "authentication"
assert "authentication" in p.logger.name
assert "connection" in p.logger.name
assert "caosdb" in p.logger.name
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment