Skip to content
Snippets Groups Projects
Commit 985be885 authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

Merge branch 'f-loggers-name' into 'dev'

F loggers name

See merge request !26
parents 7c09c4de 6a1541ed
No related branches found
No related tags found
2 merge requests!33MAINT: change arguments of create_user,!26F loggers name
Pipeline #14108 passed
...@@ -19,6 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -19,6 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Entity.add_property and Entity.add_parent do not accept `**kwargs`-style * Entity.add_property and Entity.add_parent do not accept `**kwargs`-style
keywords anymore. Formerly known keywords have been refactored into named keywords anymore. Formerly known keywords have been refactored into named
parameters. parameters.
* [#35](https://gitlab.com/caosdb/caosdb-pylib/-/issues/35) Loggers now use the name of
the unit where they are called instead of a static name
### Deprecated ### ### Deprecated ###
......
...@@ -36,7 +36,7 @@ from caosdb.exceptions import LoginFailedError ...@@ -36,7 +36,7 @@ from caosdb.exceptions import LoginFailedError
# meta class compatible with Python 2 *and* 3: # meta class compatible with Python 2 *and* 3:
ABC = ABCMeta('ABC', (object, ), {'__slots__': ()}) ABC = ABCMeta('ABC', (object, ), {'__slots__': ()})
_LOGGER = logging.getLogger("authentication") _LOGGER = logging.getLogger(__name__)
class AbstractAuthenticator(ABC): class AbstractAuthenticator(ABC):
......
...@@ -60,7 +60,7 @@ except ImportError: ...@@ -60,7 +60,7 @@ except ImportError:
# pylint: disable=missing-docstring # pylint: disable=missing-docstring
_LOGGER = logging.getLogger("connection") _LOGGER = logging.getLogger(__name__)
class _WrappedHTTPResponse(CaosDBHTTPResponse): class _WrappedHTTPResponse(CaosDBHTTPResponse):
......
...@@ -65,4 +65,6 @@ def test_subclass_configure(): ...@@ -65,4 +65,6 @@ def test_subclass_configure():
def test_plain_has_logger(): def test_plain_has_logger():
p = PlainTextCredentialsProvider() p = PlainTextCredentialsProvider()
assert hasattr(p, "logger") 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