Skip to content

Configuration Reference

This page summarizes babyrite's configuration options and their default values. For how to point to a configuration file, see Getting Started.

Default Configuration

If you don't provide a configuration file, the following defaults are used.

toml
[log]
level = "babyrite=info"
format = "compact"

[features]
github_permalink = true
commands = true

[github]
max_lines = 50

Configuration Options

KeyDescriptionDefault Value
log.levelLog level filter (same syntax as RUST_LOG). If RUST_LOG is set, it takes precedence."babyrite=info"
log.formatLog output format: "compact" or "json"."compact"
json_loggingDeprecated. Use log.format = "json" instead. Only used when log.format is unset.false
features.github_permalinkToggles GitHub permalink expansion on or off.true
features.commandsToggles the mention-prefixed command system (e.g. @babyrite ping) on or off.true
github.max_linesMaximum number of lines shown without truncation.50

Logging

babyrite uses tracing to write logs to standard output.

  • Log level is resolved in the following order of precedence: the RUST_LOG environment variable takes priority if set; otherwise, config.toml's log.level (default babyrite=info) is used. If you want detailed debug logs during development — cache hits/misses, external API latency, permission check outcomes, and so on — set RUST_LOG=babyrite=debug or log.level = "babyrite=debug".
  • Structured output for Grafana Loki and similar tools: setting log.format = "json" outputs one JSON object per line. Each line includes structured fields — message_id, guild_id, and channel_id — derived from a per-request span, letting you trace a single request end to end. Collect the container's standard output with Promtail or Grafana Alloy and query the fields from LogQL with the | json parser.