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, and SLF4J is a no-op unless the application binds a backend - so an application that has not asked for logging stays silent. 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

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, a secret key name, an API key, a session JWT or a workload OIDC token. Where a key must be identified - a file secret that could not be materialised, for instance - 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, key name, API key or token appears anywhere in the output - message, parameters or stack trace. 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.