NexusConfig.logger:
Values are fields, not text
The message is a stable literal and every value travels infields:
component is stream” are queries.
Every record carries a component field naming the subsystem that produced it: client, stream, or wif.
Adapters
pino - note the argument order is(fields, message):
console, for development:
Logger in for you - there is nothing to configure, and the startup summary appears in the application log.
Why the SDK owns the interface
Node has nolog/slog in its standard library, and the two most widely used loggers disagree on argument order: pino takes (fields, message), winston takes (message, meta). Adopting either signature would force that library’s shape on every consumer. The SDK therefore defines four methods, depends on nothing, and documents the three-line adapter.
When you pass nothing
Without alogger the SDK follows Node’s conventions for a library: it writes nothing uninvited
except problems.
-
warnanderrorbecome Node process warnings, so a failing background refresh is discoverable with nothing configured: -
debugandinfogo toutil.debuglog, Node’s own switch for library diagnostics. SetNODE_DEBUG=westyx-nexusin the environment - in a pod manifest, for instance - and they are written to standard error:
NOOP_LOGGER to silence even the process warnings. Newlines in a rendered value are collapsed
to spaces, so a multi-line value cannot forge additional log records.
The startup summary
After the first sync the client logs oneinfo record naming what it received:
+N more entry after
that, so a large service stays one readable record. It is how you confirm from a pod’s log which
configs, secrets and flags a deployment actually pulled.
Where it appears:
Secret values never reach the logger
No log record carries a secret’s value. This is enforced rather than intended: a test drives a sync carrying a text secret and a file-type secret through a capturing logger at debug level, and fails if either value appears anywhere in the output. Key names do appear - in the startup summary, and in the warning for a secret the server did not deliver (nexus: the server did not deliver a resource, with its key). A name identifies what to
look up; it is not the credential. File-type secrets are still written under hashed filenames,
because a path travels further than a log line - see
File-type secret security.
A logger that throws is contained
A logger whose method throws never fails an SDK operation. Every internal log call is wrapped, so a failing sink - a full disk, a down syslog target - is dropped and the read, refresh, orcreate() that logged carries on. The stream observer is contained the same way. The Workload Identity credential source is deliberately not - it is on the auth path, so its error surfaces rather than being swallowed.
What is logged where
Next
- Error handling
- Stream observer - the structured counterpart, for metrics rather than text
