Skip to main content

bhtune_runtime/config/
log.rs

1#![allow(rustdoc::broken_intra_doc_links)]
2
3use serde::{Deserialize, Serialize};
4
5/// Logging configuration keys (a `[log]` table in `bhtune.toml`), consumed by
6/// `crate::logging::resolve_log_settings`. Every field is optional and falls back through
7/// the same `CLI flag > env var > config file > default` precedence as the rest of
8/// [`BhtuneConfig`].
9#[derive(Debug, Default, Clone, Deserialize, Serialize, PartialEq, Eq)]
10#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
11pub struct LogConfig {
12    pub level: Option<String>,
13    pub dir: Option<String>,
14    pub format: Option<String>,
15    pub rotation: Option<String>,
16}