You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 35263ff
Browse filesBrowse the repository at this point in the historyBrowse files
feat(startup): replace the banner with one record when LOG_FORMAT=json
A pipeline that insists every line parses cannot have a logo, and it cannot
have it silently: `LOG_FORMAT=json` now writes one `relay starting` record
carrying the banner's facts as fields (`version`, `supportedNips`, `payments`,
`eventStore`, `clientWorkers`, `maintenanceWorkers`, `relayMonitor`,
`dvmWorkers`), with pino's own `level`/`time`/`pid`/`hostname`, and suppresses
the centred lines that follow.
Anything else — unset, `pretty`, a typo — keeps the banner, because the person
reading `docker compose logs` is the default audience. The record is written
before any worker forks, so it opens the stream, and it shares the banner's
writer, so a test can read stdout instead of reaching into pino.
Copy file name to clipboardExpand all lines: .changeset/startup-banner-stdout.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
'nostream': patch
3
3
---
4
4
5
-
fix(startup): print the banner as text instead of one JSON record per line
5
+
fix(startup): print the banner as text, and let `LOG_FORMAT=json` opt out of it
6
6
7
-
`docker compose logs nostream` showed the logo as a single log record with the newlines escaped. The banner and its centred facts now go to stdout as text. Nothing is lost for a log pipeline: `createLogger` stringifies an object argument anyway, so every other line is text too — this one is simply printed where a person can read it.
7
+
`docker compose logs nostream` showed the logo as a single log record with the newlines escaped. The banner and its centred facts now go to stdout as text.
8
+
9
+
A pipeline that requires every line to parse sets `LOG_FORMAT=json`: the logo is then replaced by one `relay starting` record carrying the same facts as fields (`version`, `supportedNips`, `payments`, `eventStore`, `clientWorkers`, …). Any other value keeps the banner, which is what a person reading the logs wants.
| WORKER_COUNT | Number of workers override | No. of available CPUs |
13
+
| LOG_FORMAT | Set to `json` to replace the startup banner with one `relay starting` record, so every line the relay writes parses as JSON. | (banner) |
13
14
| DB_URI | PostgreSQL URI (overrides DB_HOST, DB_PORT, etc.) ||
0 commit comments