logging module, to the logger named
westyx_nexus, which carries only a NullHandler. That is what the
Logging HOWTO
asks of a library: silent until the application configures logging, visible as soon as it does,
with nothing passed to the SDK.
LOGGER_NAME.
What the SDK logs
The startup summary
After the first sync both clients log oneinfo record naming what they received:
+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.
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 warning the first time it appears;
client.sync_errors lists the current ones. log_sync_errors=False keeps the list without the log
lines.
Secret values never reach the logger
No log record carries a secret’s value, the API key or a session token. This is enforced: a test drives a sync, a write and the WIF path through a capturing logger and fails if any of them appears. 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.A custom logger
NexusConfig.logger takes any object with these methods - a Protocol, so there is no base class
to inherit:
warning still works: its warnings arrive at info.
StdlibNexusLogger(name="myapp.nexus") nests the SDK under your own logger hierarchy.
structlog
Loguru
A logger that raises is contained
A logger whose method raises 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.