Skip to main content
The SDK logs through SLF4J, the JVM ecosystem’s standard logging abstraction. There is no bespoke logger interface to implement.

Enabling it

Nothing to enable. NexusConfig.logger defaults to the SLF4J logger named dev.westyx.nexus, so SDK output goes wherever the application’s SLF4J backend sends it - the JVM library norm. With no backend bound, SLF4J prints one notice of its own and discards the rest. To route SDK output somewhere specific, pass your own logger:
With the Ktor plugin the default is the Ktor application’s own logger, so SDK output lands in the application log with no configuration at all.

What is logged

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 line. It is how you confirm from a pod’s log which configs, secrets and flags a deployment actually pulled. It goes through NexusConfig.logger like every other record - with the Ktor plugin, the application’s own log.

Resources the server did not deliver

A sync can report resources it left out - a secret that has no value yet (secret_not_set), a config whose {{secret:KEY}} reference does not resolve (config_unresolved_secret). Such a secret or config reads as absent. Each omission is logged as a warn the first time it appears; client.syncErrors lists the current ones. logSyncErrors = false keeps the list without the log lines.
Values are passed as structured parameters, never interpolated into the message:
A message that embeds its values produces a unique string per occurrence, which cannot be grouped or queried in a log aggregator - and it also defeats SLF4J’s level check, since the string is built whether or not the level is enabled.

Secret hygiene

No log record carries a secret value, an API key, a session JWT or a workload OIDC token. Key names do appear - in the startup summary and in the omission warning. A name identifies what to look up; it is not the credential. Where a file secret could not be materialised, only a truncated hash of the key appears. This is enforced, not just intended. LoggingSecretLeakTest drives a sync carrying both a text and a file-type secret, a secret read, a file-path read and a WIF token exchange through a capturing logger with every level enabled, then fails if any seeded value, API key or token appears anywhere in the output - message, parameters or stack trace. Server-supplied text in the omission warning is collapsed to one line, so it cannot forge a record. NexusConfig.toString() also redacts apiKey, since a config object is often printed while debugging.

Observer failures

A NexusObserver callback that throws is absorbed by the SDK’s guarded dispatcher and reported here at warn, naming the callback:
Absorbing without reporting would be the worse failure - the stream would carry on while the application’s own instrumentation silently stopped working. See Stream observer.