logging.getLogger(...) calls, and library logs like Procrastinate’s worker output. They all land in one place, in one format, with no per-module setup needed.
Configuring fymo.yml
Everything is controlled by thelogging: section. The section is optional; every key has a default.
A relative
file path resolves against the project root. Validation is fail-fast: an unrecognized value raises a ValueError that names the offending key, right at startup. That beats silently falling back to a default and logging somewhere you didn’t expect.
configure() is idempotent. Calling it again, such as across a test session or after a config reload, swaps out only the handler fymo itself installed. Handlers attached by anything else, including pytest’s caplog, are left alone.What gets captured
Because the handler sits on the root logger, three sources flow through it:- Fymo’s own access and job logs.
- Any logger your app code creates with
logging.getLogger(__name__). - Library logs, such as Procrastinate’s worker output in the jobs process.
logging.level. Otherwise, the stdlib default of WARNING would filter out your app’s INFO lines before the handler even saw them.
In text mode, app and library records print as LEVEL logger: message; fymo’s own lines print pre-formatted (see below). In JSON mode, they become {"logger": ..., "level": ..., "message": ...} objects instead. An exc_info key gets added whenever the record carries a traceback.
One more source rides alongside: the Node sidecar’s stderr is captured and forwarded line by line with a [sidecar] prefix. A console.log inside a component during server-side rendering lands there, so in fymo dev you’ll see it as [sidecar] your message in the terminal instead of it vanishing (or, as in versions before 0.18.1, hanging the request).
Request logs
Every completed request gets one log line, at theINFO level:
Job lifecycle logs
Every job submitted through aJobProvider runs through a shared lifecycle wrapper. Both the threaded runner and the Procrastinate worker log the same three states:
level: debug. At the default info level, you’ll only see the succeeded and failed lines.
