Skip to content

Use logging filter for --comfyui-inference-log-level flag #436

Description

@eliteprox

A logging filter would be more appropriate than the current async with approach for --comfyui-inference-log-level

async with temporary_log_level("comfy", self._comfyui_inference_log_level):
out_tensor = await self.client.get_audio_output()

comfystream/server/app.py

Lines 622 to 629 in 4f48695

parser.add_argument(
"--comfyui-inference-log-level",
default=None,
choices=logging._nameToLevel.keys(),
help="Set the logging level for ComfyUI inference",
)
args = parser.parse_args()

comfystream/server/app.py

Lines 693 to 696 in 4f48695

# Allow overriding of ComyfUI log levels.
if args.comfyui_log_level:
log_level = logging._nameToLevel.get(args.comfyui_log_level.upper())
logging.getLogger("comfy").setLevel(log_level)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions