Logging
artifacthub-shim uses zap for structured process logs. The default chart
configuration writes JSON logs to stdout at info level, which is suitable for
Kubernetes log collection.
Configure level and format
Use logging.level and logging.format for the common cases:
Supported levels are debug, info, warn, and error. Supported formats
are json and console.
The chart renders these values to:
Use debug temporarily when diagnosing repository refresh, indexing, or API
request behavior. Return to info after the investigation because per-source
and request-level debug logs can be verbose.
Use a zap config file
For advanced logging needs, provide a YAML or JSON file that follows the
zap.Config structure. When ARTIFACTHUB_SHIM_LOG_CONFIG_FILE is set, the
process reads that file during startup and ignores ARTIFACTHUB_SHIM_LOG_LEVEL
and ARTIFACTHUB_SHIM_LOG_FORMAT.
The chart can render the file from logging.config:
This creates a ConfigMap and mounts it at
/etc/artifacthub-shim/logging.yaml. The process receives
ARTIFACTHUB_SHIM_LOG_CONFIG_FILE=/etc/artifacthub-shim/logging.yaml.
You can also mount your own file and point the chart at it:
Do not set logging.config and logging.configFile at the same time.
Apply changes
The logger reads file-based configuration only during process startup. After
changing logging.level, logging.format, logging.config, or a custom
mounted config file, restart the deployment or perform a rollout restart:
Sensitive data
The service does not log request bodies, Kubernetes Secrets, bearer tokens, or Authorization headers. Git URLs with user information are redacted before they are returned in logs or source status messages.