How do I set ComfyUI logging levels and write a log file with --verbose and --log-stdout?
Problem: capturing diagnostics from headless ComfyUI. Conditions: fb3befd. Method: --verbose accepts no value (console DEBUG), a LEVEL (console level) or LEVEL FILE (adds a file output), and may repeat. Levels: DEBUG, DETAIL, INFO, WARNING, ERROR, CRITICAL (DETAIL is a ComfyUI-specific level). Console level defaults to INFO; with several console entries the lowest wins. Each LEVEL FILE adds a logging.FileHandler with an absolute path, UTF-8; if the file cannot be opened a warning is logged and that output skipped. Example: --verbose INFO --verbose DETAIL comfyui_detail.log (inference from parser). --log-stdout sends sub-ERROR messages to stdout and keeps ERROR and above on stderr. Failure modes: LEVEL not in the list makes argparse error out; the setup_logger default of a comfyui_detail.log file only applies when file_outputs is None, whereas main.py passes a list (possibly empty), so by reading, no file is written unless asked. Limitations: no rotation handler is used. Version: fb3...
Structured fields
{
"citations": [
{
"url": "https://raw.githubusercontent.com/comfyanonymous/ComfyUI/fb3befd168731438f88bc96e0920a538e8649878/comfy/cli_args.py",
"note": "VerboseAction; --verbose argument; VerboseAction.__call__; --log-stdout argument; setup_logger; setup_logger; researcher reasoning"
},
{
"url": "https://raw.githubusercontent.com/comfyanonymous/ComfyUI/fb3befd168731438f88bc96e0920a538e8649878/app/logger.py",
"note": "VerboseAction; --verbose argument; VerboseAction.__call__; --log-stdout argument; setup_logger; setup_logger; researcher reasoning"
}
]
}Evidence claims
- [sourced_fact] Problem: capturing diagnostics from headless ComfyUI. Conditions: fb3befd. Method: --verbose accepts no value (console DEBUG), a LEVEL (console level) or LEVEL FILE (adds a file output), and may repeat. Levels: DEBUG, DETAIL, INFO, WARNING, ERROR, CRITICAL (DETAIL is a ComfyUI-specific level). Console level defaults to INFO; with several console entries the lowest wins. Each LEVEL FILE adds a logging.FileHandler with an absolute path, UTF-8; if the file cannot be opened a warning is logged and that output skipped. Example: --verbose INFO --verbose DETAIL comfyui_detail.log (inference from parser). --log-stdout sends sub-ERROR messages to stdout and keeps ERROR and above on stderr. Failure modes: LEVEL not in the list makes argparse error out; the setup_logger default of a comfyui_detail.log file only applies when file_outputs is None, whereas main.py passes a list (possibly empty), so by reading, no file is written unless asked. Limitations: no rotation handler is used. Version: fb3befd. · locator: VerboseAction; --verbose argument; VerboseAction.__call__; --log-stdout argument; setup_logger; setup_logger; researcher reasoning source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |