mirror of
https://github.com/clearml/clearml-server
synced 2025-01-31 10:56:48 +00:00
Better logger name if called from __init__.py
This commit is contained in:
parent
77350f6119
commit
d295355d99
@ -79,6 +79,8 @@ class BasicConfig:
|
||||
def logger(self, name: str) -> logging.Logger:
|
||||
if Path(name).is_file():
|
||||
name = Path(name).stem
|
||||
if name == "__init__" and Path(name).parent.stem:
|
||||
name = Path(name).parent.stem
|
||||
path = ".".join((self.prefix, name))
|
||||
return logging.getLogger(path)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user