Add console_logger factory
@@ -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
