Open dogky123 opened 2 months ago
By default, Loguru will try to automatically detect if the sink supports colors (e.g. console terminal as opposed to file sink) by calling the isatty()
method.
The sys.stderr
in your Docker container is likely redirected and not a tty, causing the colors to be disabled.
You can force them anyway by replacing the default sink with logger.add()
and specifying colorize=True
:
logger.remove()
logger.add(sys.stderr, colorize=True)
the script work in container but there is no color. All config is default.
thank you for your works.