pub struct LoggingConfig {
pub level: String,
pub tags: BTreeMap<String, String>,
pub retention: Retention,
pub alarm_segment_mb: u32,
}Expand description
Logging policy parsed from subc.jsonc.
retention is the rename-rotating policy for the daemon’s per-child
stderr CAPTURE file (single writer). The daemon’s own log and every module’s
log are date segments under fleet-logging r2, which never rotate; for those
only retention.max_age_days applies, plus alarm_segment_mb.
Fields§
§level: StringPer-logger levels. Keys are logger names; a key with no dot is taken
as a COMPONENT of the module it is configured on (perf on synapse is
synapse.perf), so an operator’s subc.jsonc reads naturally. See
LoggingConfig::filter_spec.
retention: Retention§alarm_segment_mb: u32Segment size at which the writer alarms (never truncates).
Implementations§
Source§impl LoggingConfig
impl LoggingConfig
Sourcepub fn filter_spec(&self, module_id: &str) -> String
pub fn filter_spec(&self, module_id: &str) -> String
The CK_LOG value for module_id. Logger names in CK_LOG are
absolute (synapse.perf=info), while the config block is written per
module, so a dotless key is prefixed with the module id here. A key
that already starts with <module_id>. or contains a dot is passed
verbatim; a key equal to the module id is the root and is also
verbatim. Without this a config tags: { perf: debug } would emit
perf=debug, which matches no logger on the r2 hierarchy and silently
does nothing.