Files
olivv-cs-ComfyUI-FunPack/core/log.py
T
digital-garbage d5effb0378 core: serve the app, with the module allowlist as the wall
Static serving routes through a pure resolve(), so the extension allowlist and
the traversal guard are tested without aiohttp. modules/ serves .js only: a
module cannot ship a stylesheet even if one is written.
2026-08-28 14:18:55 +03:00

18 lines
418 B
Python

"""One-line logging with a fixed prefix.
`failed()` exists so a module that silently no-ops is impossible: every swallowed
exception says what stopped working, once.
"""
import sys
PREFIX = "[FunPack]"
def note(message: str) -> None:
print(f"{PREFIX} {message}", file=sys.stderr, flush=True)
def failed(what: str, exc: BaseException) -> None:
note(f"{what} failed to load: {type(exc).__name__}: {exc}")