mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Ensure we have at least one logging root handler
Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
This commit is contained in:
parent
3da9b8dd33
commit
e84801a381
1 changed files with 6 additions and 0 deletions
|
@ -933,6 +933,12 @@ def shutdown_multiprocessing_logging():
|
|||
logging.root.removeHandler(__MP_LOGGING_QUEUE_HANDLER)
|
||||
__MP_LOGGING_QUEUE_HANDLER = None
|
||||
__MP_LOGGING_CONFIGURED = False
|
||||
if not logging.root.handlers:
|
||||
# Ensure we have at least one logging root handler so
|
||||
# something can handle logging messages. This case should
|
||||
# only occur on Windows since on Windows we log to console
|
||||
# and file through the Multiprocessing Logging Listener.
|
||||
setup_console_logger()
|
||||
finally:
|
||||
logging._releaseLock()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue