Skip to content

Logging

The authority daemon, agent and relay log to stderr with a severity marker and an ISO 8601 timestamp with milliseconds, using Kronuz/logger, the logging library extracted from Xapiand.

▎2026-10-09 09:16:59.331 detent-authority: durable single-voter authority listening with HTTP on 127.0.0.1:8317
▌2026-10-09 09:17:01.943 detent-authority: rejected publish (version)
▍2026-10-09 09:19:24.916 detent-agent: source connected

On a terminal, messages use Xapiand’s severity tint and timestamps use a grey gradient. Tinting is the default; there is no separate tint option. Redirected output is plain unless color is forced.


Terminal window
detent-authority # lifecycle messages and warnings (default: info)
detent-authority -v # verbosity 1
detent-agent -v # also agent publication details
detent-agent -vv # also source metric samples, every 200 ms
detent-authority --log-level warning # quiet service logs
detent-authority --color never # plain output even on a terminal
FlagEffect
--log-level LEVELemergency, alert, critical, error, warning, notice, info, debug
-v, -vv, --verbosity 0..2Raise the level
--color auto|always|never, --no-colorColor policy; auto honors NO_COLOR
--color truecolor|256|16Force RGB, 256-color or ANSI 16-color output, including when redirected

The same settings work in agent.json and detent-authority.json; command-line flags win:

{"log_level": "info", "verbosity": 0, "color": "auto"}

always and explicit color depths override NO_COLOR. As in Xapiand, 24bit, 256color and ansi alias the corresponding depths; on/off alias always/never. stacked preserves all three portable color tiers.

Terminal window
detent-authority --color truecolor -v >detent.log 2>&1

  1. Startup and shutdown of the daemons.
  2. Agent source transitions: connected, unavailable, and refresh failures. Repeated failures drop to debug until a newer snapshot arrives.

Hash values, switch values and knob values are never logged.

HTTP logging omits headers, bodies, query values and exception descriptions. Method and path labels are bounded and escaped. These logs describe the handler’s response before HTTP transforms, not confirmed network delivery. Authority and relay HTTP access logging remains pending a shared completion observer for deferred replies and owned streams; their lifecycle logs already use the shared tint.


ModeDestination
Foregroundstderr
--daemonizeagent.log (or a per-port detent-authority log) in the runtime directory
systemdThe journal
launchd, rc.d/var/log/detent

Logging drains before a normal exit, including on SIGTERM. Routine messages are queued with a 4,096-entry limit; warnings and errors bypass it and critical messages are written synchronously.


The original logger addition cost detent-agent 88,280 bytes. The detent reader doesn’t link the logger at all. See Benchmarks.

The later color-depth and HTTP metadata addition costs 88 bytes in the agent; this is a separate comparison with different build settings. Recorded qualification preserves the coherent public pins and clean product build.

The accepted exploratory comparison uses three alternating pairs per mode with 100k knobs and 20k conditional polls. Default-filtered CPU medians are 0.51/0.52 seconds, one counter tick apart; the paired median change is zero with substantial variation. Verbose logging adds about 47–47.5 CPU seconds per million polls (0.013 core-hours), and every verbose candidate retains all request and response entries. The component review accepts the file-size exception. These measurements establish neither zero default overhead nor an incremental RGB cost. Allocation, peak memory and fleet capacity remain open.