Logging
This document provides guidance on configuring logging for the Kannika Platform.
Synopsis
Section titled “Synopsis”Logging is configured globally using the global.logging Helm values.
These settings apply to all components,
including every runtime pod created by the operator.
Setting the level to debug or trace globally can produce a significant amount of log output.
Consider overriding the level on individual resources instead.
global: logging: format: "json" # `json` (default) or `text` level: "info" # `error`, `warn`, `info` (default), `debug`, or `trace`Per-resource overrides
Section titled “Per-resource overrides”The operator propagates the global logging settings to every runtime pod it creates.
You can override the log level or format for an individual resource
by adding KANNIKA_LOG_LEVEL or KANNIKA_LOG_FORMAT to its extraEnvVars:
apiVersion: io.kannika/v1alphakind: Backupmetadata: name: my-backupspec: source: "my-kafka" sink: "my-storage" extraEnvVars: - name: KANNIKA_LOG_LEVEL value: "debug"This is the recommended way to increase verbosity for a specific backup or restore without affecting all other components.
Advanced: RUST_LOG
Section titled “Advanced: RUST_LOG”For fine-grained control,
you can set the RUST_LOG environment variable.
When RUST_LOG is set,
it takes full precedence over KANNIKA_LOG_LEVEL
and allows targeting specific modules:
apiVersion: io.kannika/v1alphakind: Backupmetadata: name: my-backupspec: source: "my-kafka" sink: "my-storage" extraEnvVars: - name: RUST_LOG value: "info,kannika=trace"See the Rust tracing documentation for the full filter syntax.
How it works
Section titled “How it works”The Helm chart translates global.logging.format and global.logging.level
into the KANNIKA_LOG_FORMAT and KANNIKA_LOG_LEVEL environment variables
on the operator and API deployments.
The operator propagates these same environment variables to any runtime pods it creates
(backups, restores, registry backups, and registry restores).
Any extraEnvVars set on the resource are appended after the global values
and can override them.
Console logging
Section titled “Console logging”Check the browser’s developer console for logs related to the console component.