Skip to content

Conversation

webfiltered
Copy link
Collaborator

@webfiltered webfiltered commented Dec 27, 2024

Add option to log non-error output to stdout

  • No change to default behaviour
  • Adds CLI argument: --log-stdout
  • With this arg present, any logging of a level below logging.ERROR will be sent to stdout instead of stderr
  • Fixes typo

Motivation

3rd party logging libraries sometimes treat error streams differently to regular streams. The logging library used by the desktop app tags error output with [error] by default. Currently, there is no way to determine if output is an error or not, without parsing all text (which is brittle at best).

This change allows the invoker to decide if ComfyUI should try to emulate normal executable output (rather than python logging default).

- No change to default behaviour
- Adds CLI argument: --log-stdout
- With this arg present, any logging of a level below logging.ERROR will be sent to stdout instead of stderr
@webfiltered webfiltered changed the title Log std split Add option to log non-error output to stdout Dec 27, 2024
@webfiltered webfiltered marked this pull request as ready for review December 27, 2024 18:26
@huchenlei huchenlei added the Good PR This PR looks good to go, it needs comfy's final review. label Dec 27, 2024
@comfyanonymous comfyanonymous merged commit 9cfd185 into master Dec 27, 2024
8 checks passed
@comfyanonymous comfyanonymous deleted the log-std-split branch December 27, 2024 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Good PR This PR looks good to go, it needs comfy's final review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants