Add console_logger factory
MODIFY
plextraktsync/factory.py
plextraktsync/factory.py
@@ -118,6 +118,17 @@ def walker(self):
return w
+ @memoize
+ def console_logger(self):
+ from rich.highlighter import ReprHighlighter
+ from rich.logging import RichHandler
+
+ from plextraktsync.console import console
+
+ handler = RichHandler(console=console, show_time=False, show_path=False, highlighter=ReprHighlighter())
+
+ return handler
+
@memoize
def config(self):
from plextraktsync.config import CONFIG

Add console_logger factory