make rich to output to stderr instead of stdout

This commit is contained in:
Kohya S
2024-02-08 21:38:02 +09:00
parent 055f02e1e1
commit 5d9e2873f6

View File

@@ -49,8 +49,10 @@ def setup_logging(args=None, log_level=None, reset=False):
if not args or not args.console_log_simple:
try:
from rich.logging import RichHandler
from rich.console import Console
from rich.logging import RichHandler
handler = RichHandler()
handler = RichHandler(console=Console(stderr=True))
except ImportError:
# print("rich is not installed, using basic logging")
msg_init = "rich is not installed, using basic logging"