Skip to content

feat: unified structured logger from lib-node 3 - #135

Merged
albanm merged 5 commits into
masterfrom
feat-lib-node-3
Nov 17, 2026
Merged

albanm merged 5 commits into
masterfrom
feat-lib-node-3

Conversation

@BatLeDev

@BatLeDev BatLeDev commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Move to @data-fair/lib-node 3 and @data-fair/lib-express 2, whose pino logger replaces internalError and eventsLog, as the other services already did (catalogs #44).

  • The api and the worker's parent process log through @data-fair/lib-node/log.js: static code, ids in their own fields, the error in err. Plugin failures and memory kills are warn, error stays for internal failures.
  • The worker runs each run in withLogContext({ processingId, runId, ...ownerLogFields(owner) }) (ownerKey, ownerDep, ownerName, as data-fair and catalogs); relayed plugin output is cut at 1000 characters.
  • The task child process keeps console (the parent reads <running> on its stdout and shows its stderr to the user); the parent relays those lines as task-stdout / task-stderr log lines instead of raw writes.
  • eslint no-console on server code, a Logging section in AGENTS.md, pino-pretty as a dev dependency.

Why: processings was the last service on lib-node 2.

Heads-up: production logs become one JSON object per line (NODE_ENV=production), so anything parsing the old text lines must follow; df_internal_error is still emitted during the transition.

…d d-frame

- @data-fair/lib-node-registry 0.7.2 -> 0.7.3 (api, worker): concurrent ensureArtefact calls
  share one download, temp dirs use a random suffix, a failed extraction rejects instead of
  leaving a half-written version behind the pointer (the missing processing-config-schema.json
  seen on export-file 0.8.0)
- @data-fair/frame 0.18 -> 0.19 (ui): the parent validates child messages (numeric height,
  http(s) urls only), same message protocol
- npm update in range: npm audit 21 -> 2 (1 low, 13 moderate, 7 high before), 0 with --omit=dev;
  the 2 left are nodemon 3.1.14 (latest) bundling minimatch 10, dev only
- agent-surface golden regenerated: vjsf 4.8 documents setData partial writes and the item
  check of setFieldValue
- @data-fair/lib-node 2 -> 3 and @data-fair/lib-express 1 -> 2: internalError and eventsLog are
  replaced by the pino logger (JSON on stdout in production, pretty in dev with pino-pretty)
- api and the worker's parent process log through @data-fair/lib-node/log.js, with static codes
  and ids in their own fields; plugin failures and resource kills are warn, not error
- the worker runs each run in withLogContext({ processingId, runId, ownerKey })
- the task child process keeps console (its stdout and stderr are the protocol with the parent),
  the parent relays its lines as task-stdout / task-stderr log lines
- eslint no-console on server code, Logging section in AGENTS.md
- shared/log-fields.ts: ownerLogFields (ownerKey, ownerDep, ownerName) and truncateLogValue,
  the names and limits of data-fair and catalogs
- the run log context carries the 3 owner fields; relayed task output and run failure
  messages are cut at 1000 characters
@github-actions github-actions Bot added feature and removed feature labels Nov 17, 2026
Base automatically changed from chore-deps-refresh to master November 17, 2026 15:29
@github-actions github-actions Bot added feature and removed feature labels Nov 17, 2026
@albanm
albanm merged commit 02f31f3 into master Nov 17, 2026
4 checks passed
@albanm
albanm deleted the feat-lib-node-3 branch November 17, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants