多路日志丨调试
Four-channel terminal logging that doesn't break your wires
- source1
- source2
- source3
- source4
- source1
- source2
- source3
- source4
Sometimes a value belongs in the terminal, not on the canvas. You're debugging a batch loop, you want to watch a tensor's shape change as a workflow iterates, or you need a timestamped trail of what a node did - that's what LogPrinter is for. It takes up to four inputs of any type, prints a structured, labeled log line to the ComfyUI console, and then passes all four values straight through so your workflow keeps flowing while you observe it.
It's from ComfyUI-QING (display name "多路日志丨调试"), and it sits in the same debug-tool family as the pack's LetMeSee - one for on-canvas inspection, this one for the console.
How it works
The core idea is "log and pass through." Up to four source1–source4 inputs accept any type (the * wildcard - tensors, strings, ints, whatever), each with a label1–label4 you set so the output is readable. When the node runs it prints a line to the terminal with:
title- your heading for the whole log entry.level- INFO / WARN / ERROR / DEBUG, which prefixes the line.include_timestamp/include_counter- optionally stamp each entry with the time and/or an incrementing execution counter, so you can tell which run of a loop produced which line.show_type/show_shape- control how verbose the formatting is. Tensors get a shape summary; strings are truncated at 300 chars (with a note if they were cut); booleans, ints and floats print their values.print_empty- whether to log sources that areNoneor empty (default off, so unwired inputs stay quiet).
The four source1–source4 outputs pass the inputs through untouched - that pass-through is the design decision that makes this usable inline. You drop it mid-wire, it logs, and the data continues to the next node like nothing happened.
Where it fits
The canonical use is inside a loop. A batch pipeline runs 50 iterations; you want to see the tensor shape or a key value on iteration 23. Without this, you're either watching a preview node (slow, on-canvas, gone next run) or adding print statements to the pack's code. With it, you get a timestamped, labeled line per iteration in the terminal - [INFO] 2026-08-26 ... #23 title tensor: torch.Size([1, 512, 512, 3]) - which is exactly the forensic trail you need.
The other use is checking a value at a glance before it flows somewhere critical - the string coming out of an LLM node, the token count from a Kimi call, the dimensions before a sampler. Wire it, run once, read the console, remove it or leave it (it's cheap if you keep show_shape off).
The honest take
It's not a fancy node - it's the terminal equivalent of LetMeSee, and that's the point. The four-channel design with per-channel labels beats stringing four separate print nodes together, and the pass-through means you never have to rewire to observe. The only thing to watch: this is a log-to-console node, not a UI node, so if you're looking at the browser canvas expecting to see your values there, you're looking in the wrong place - read the terminal where ComfyUI runs.
Installing
Part of ComfyUI-QING. ComfyUI Manager: search "ComfyUI-QING". Or:
cd ComfyUI/custom_nodes
git clone https://github.com/GAO-SHIQING/ComfyUI-QING
cd ComfyUI-QING
python install_dependencies.py # or: pip install -r requirements.txt
Restart ComfyUI. Pure pip deps, no models. China mirror: --mirror --auto. Python ≥ 3.9.
Gotchas
One behavior to internalize: unwired sources don't log unless print_empty is on - so a blank line in the terminal usually means "that source wasn't connected," not "the value was empty." If you're expecting four labeled lines per run and seeing fewer, that's why. And the counter (when enabled) counts executions across the whole session, not per node - useful for spotting "this node ran 40 times when I expected 5," which is itself a great debugging signal. Keep show_shape on for tensors; it's the most useful thing this node prints.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| title | STRING | 调试日志 | — |
| level | COMBO | INFO | 4 options: INFO, WARN, ERROR, DEBUG |
| include_timestamp | BOOLEAN | true | — |
| include_counter | BOOLEAN | false | — |
| show_type | BOOLEAN | true | — |
| show_shape | BOOLEAN | true | — |
| print_empty | BOOLEAN | false | — |
| label1 | STRING | 变量1 | — |
| label2 | STRING | 变量2 | — |
| label3 | STRING | 变量3 | — |
| label4 | STRING | 变量4 | — |
| source1opt | * | — | |
| source2opt | * | — | |
| source3opt | * | — | |
| source4opt | * | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| source1 | * | — |
| source2 | * | — |
| source3 | * | — |
| source4 | * | — |