fix noisy logging messages

This commit is contained in:
doctorpangloss 2025-07-17 13:06:55 -07:00
parent d709e10bcb
commit c2c45e061e
2 changed files with 4 additions and 3 deletions

View File

@ -45,6 +45,7 @@ log_msg_to_filter = "NOTE: Redirects are currently not supported in Windows or M
logging.getLogger("torch.distributed.elastic.multiprocessing.redirects").addFilter(
lambda record: log_msg_to_filter not in record.getMessage()
)
logging.getLogger("alembic.runtime.migration").setLevel(logging.WARNING)
from ..cli_args import args

View File

@ -101,11 +101,11 @@ def _vanilla_load_importing_execute_prestartup_script(node_paths: Iterable[str])
logger.error(f"ComfyUI-Manager security_check failed but was caught gracefully: {e}", exc_info=e)
security_check.security_check = patched_security_check
logger.info("Patched ComfyUI-Manager's security_check to fail gracefully.")
logger.debug("Patched ComfyUI-Manager's security_check to fail gracefully.")
# Patch logging
logging.Logger.addHandler = no_op_add_handler
logger.info("Patched logging.Logger.addHandler to prevent ComfyUI-Manager from adding a logging handler.")
logger.debug("Patched logging.Logger.addHandler to prevent ComfyUI-Manager from adding a logging handler.")
time_before = time.perf_counter()
success = execute_script(script_path)
@ -303,7 +303,7 @@ def mitigated_import_of_vanilla_custom_nodes() -> ExportedNodes:
if not getattr(threading.Thread.start, '__is_patched_by_us', False):
threading.Thread.start = patched_start
setattr(threading.Thread.start, '__is_patched_by_us', True)
logger.info("Patched `threading.Thread.start` to propagate contextvars.")
logger.debug("Patched `threading.Thread.start` to propagate contextvars.")
_vanilla_load_importing_execute_prestartup_script(node_paths)
vanilla_custom_nodes = _vanilla_load_custom_nodes_2(node_paths)
return vanilla_custom_nodes