mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-23 21:00:16 +08:00
fix noisy logging messages
This commit is contained in:
parent
d709e10bcb
commit
c2c45e061e
@ -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(
|
logging.getLogger("torch.distributed.elastic.multiprocessing.redirects").addFilter(
|
||||||
lambda record: log_msg_to_filter not in record.getMessage()
|
lambda record: log_msg_to_filter not in record.getMessage()
|
||||||
)
|
)
|
||||||
|
logging.getLogger("alembic.runtime.migration").setLevel(logging.WARNING)
|
||||||
|
|
||||||
from ..cli_args import args
|
from ..cli_args import args
|
||||||
|
|
||||||
|
|||||||
@ -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)
|
logger.error(f"ComfyUI-Manager security_check failed but was caught gracefully: {e}", exc_info=e)
|
||||||
|
|
||||||
security_check.security_check = patched_security_check
|
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
|
# Patch logging
|
||||||
logging.Logger.addHandler = no_op_add_handler
|
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()
|
time_before = time.perf_counter()
|
||||||
success = execute_script(script_path)
|
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):
|
if not getattr(threading.Thread.start, '__is_patched_by_us', False):
|
||||||
threading.Thread.start = patched_start
|
threading.Thread.start = patched_start
|
||||||
setattr(threading.Thread.start, '__is_patched_by_us', True)
|
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_load_importing_execute_prestartup_script(node_paths)
|
||||||
vanilla_custom_nodes = _vanilla_load_custom_nodes_2(node_paths)
|
vanilla_custom_nodes = _vanilla_load_custom_nodes_2(node_paths)
|
||||||
return vanilla_custom_nodes
|
return vanilla_custom_nodes
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user