Change factory.console_logger to property
MODIFY
plextraktsync/factory.py
plextraktsync/factory.py
@@ -168,7 +168,7 @@ def logger(self):
return logger
- @memoize
+ @cached_property
def console_logger(self):
from rich.logging import RichHandler

MODIFY
plextraktsync/logging.py
plextraktsync/logging.py
@@ -8,7 +8,7 @@ def initialize(config):
log_level = logging.DEBUG if config.log_debug else logging.INFO
# messages with info and above are printed to stdout
- console_handler = factory.console_logger()
+ console_handler = factory.console_logger
console_handler.terminator = ""
console_handler.setFormatter(logging.Formatter("%(message)s"))
console_handler.setLevel(logging.INFO)

Change factory.console_logger to property