[Feature] Allow the background log path to be specified
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 58/100
Direzione di ricerca
Inizia dal punto di ingresso del lancio e segui background_launch() fino a background_log_path(port); esamina _open_log_for_write() e il modo in cui comfy logs legge la chiave di configurazione background_log. Decidi se la variabile d’ambiente o un’opzione di lancio costituisce l’interfaccia supportata, quindi verifica che il percorso selezionato venga registrato e che la protezione esistente contro il follow dei collegamenti simbolici rimanga intatta. Aggiorna la documentazione pertinente di comfy logs se il comportamento cambia.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What
comfy launch --background writes ComfyUI's output to
<workspace>/user/comfyui_<port>.log, and there is currently no way to ask for a
different path. A --log-file option on launch, or an env var honoured by
background_log_path(), would let a supervising process keep that log wherever it
keeps its others.
Why
comfy-cli is increasingly something else starts — a project launcher, a dev
script, a systemd unit. Those supervisors usually have one convention for where
their managed services log (/tmp/<name>.log, /var/log/<name>/, a run
directory), and ComfyUI is the one participant whose log lands somewhere else, in
a location that also moves with the workspace.
In our case (a launcher that starts piper / ollama / a Chatterbox bridge / ComfyUI
side by side) every other helper announces (logs: /tmp/<name>.log) on startup
and points back there on failure. ComfyUI can't, so we symlink /tmp/comfyui.log
at comfy-cli's file instead. That works fine — this is a convenience request, not
a defect report.
Current state, for reference
launchexposes--backgroundand--frontend-pr; no log option.background_launch()computeslog_path = background_log_path(port)
unconditionally.- The
background_logconfig key looks like it might be an input, but it's
written by comfy-cli after launch and read back only bycomfy logsto locate
the file.
Suggested shape
Either is fine; the env var alone would cover the supervisor case:
def background_log_path(port, workspace: str | None = None) -> str:
override = os.environ.get("COMFY_BACKGROUND_LOG")
if override:
return os.path.abspath(override)
...
One thing worth preserving
_open_log_for_write() opens with O_NOFOLLOW so a pre-placed symlink in
<workspace>/user can't be used to clobber its target — a good defence, and an
override path should keep it rather than special-casing "trusted" locations. Worth
saying explicitly in the docs for such an option: the override must be a real
file path, not a symlink, or the launch fails with ELOOP.
That behaviour is also why the workaround has to point the other way (a symlink
at comfy-cli's file, never the workspace path symlinked outward) — which is
easy to get backwards, and might deserve a line in the comfy logs docs
regardless of whether this request is taken up.
- Lingua principale
- Python
- Stelle
- 1k
- Fork
- 176
- Merge medio
- 1g 11h
- PR unite (30g)
- 87
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Comfy-Org/comfy-cli
-
test_file_utils umask tests assert against a umask the code never reads (import-time _UMASK), so they only pass on a 0o022 hostForse già presa @neverbiasu l’ha presa 10 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
Comfy-Org/comfy-cli#907 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
Comfy-Org/comfy-cli#781 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
`comfy launch --background` fails with FileNotFoundError when comfy-cli is invoked by pathForse già presa @RaphaelFakhri l’ha presa 42 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Comfy-Org/comfy-cli#691 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Comfy-Org/comfy-cli#670 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Comfy-Org/comfy-cli
Issue simili
-
plot_graph crashes when a mesh node has no m2m edgeForse già presa @tygvi l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
mllam/neural-lam#883 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
enhancement possible-duplicate
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
AOSSIE-Org/PictoPy#1715 · 2 commenti ·
I maintainer di solito rispondono entro 6 giorni
-
SQLite connector omits generated columns from the catalog, and drops relationships sourced on themAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
NVIDIA/auto-ontology#511 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ethereum/execution-specs#3996 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
cpp-best-practices/project_validator#267 ·
I maintainer di solito rispondono entro 1 giorno