diff --git a/moonraker/utils.py b/moonraker/utils.py index fde1640..55d8b8e 100644 --- a/moonraker/utils.py +++ b/moonraker/utils.py @@ -6,6 +6,7 @@ import logging import logging.handlers import os +import sys import subprocess import asyncio from queue import SimpleQueue as Queue @@ -75,9 +76,14 @@ def setup_logging(log_file, software_version): root_logger.setLevel(logging.INFO) file_hdlr = MoonrakerLoggingHandler( software_version, log_file, when='midnight', backupCount=2) + stdout_hdlr = logging.StreamHandler(sys.stdout) formatter = logging.Formatter( '%(asctime)s [%(filename)s:%(funcName)s()] - %(message)s') file_hdlr.setFormatter(formatter) - listener = logging.handlers.QueueListener(queue, file_hdlr) + stdout_fmt = logging.Formatter( + '[%(filename)s:%(funcName)s()] - %(message)s') + stdout_hdlr.setFormatter(stdout_fmt) + listener = logging.handlers.QueueListener( + queue, file_hdlr, stdout_hdlr) listener.start() return listener