Skip to main content
The SDK writes its diagnostics to whatever you pass as NexusConfig.logger:

Values are fields, not text

The message is a stable literal and every value travels in fields:
This is what makes the output usable in an aggregator. A message that interpolates its values produces a unique string per occurrence, so nothing can group them, count them, or alert on them - you can only grep. With fields, “how many syncs failed in the last hour” and “show me every record where 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):
winston:
console, for development:
In NestJS, the module bridges Nest’s own 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 no log/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 a logger the SDK follows Node’s conventions for a library: it writes nothing uninvited except problems.
  • warn and error become Node process warnings, so a failing background refresh is discoverable with nothing configured:
  • debug and info go to util.debuglog, Node’s own switch for library diagnostics. Set NODE_DEBUG=westyx-nexus in the environment - in a pod manifest, for instance - and they are written to standard error:
Pass 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 one info record naming what it received:
Names only, never a value. Each list is sorted and capped at 50 names, with a +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, or create() 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