Establish config loading and logging infrastructure
First working milestone of the Rust rewrite. Implements the two foundational systems every other component depends on: - TOML-based layered config (beds.toml + env.toml override) replacing the PHP XML config system, fully deserialized into typed structs via serde — no runtime string key lookups, shape enforced at compile time - Structured logging via tracing + tracing-journald, with optional console mirror, initialized from config before any services start Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
mod config;
|
||||
mod logging;
|
||||
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
let cfg = config::load().expect("Failed to load config");
|
||||
|
||||
logging::init_from_config(cfg.syslog, cfg.syslog_mirror_console);
|
||||
tracing::info!("BEDS starting, env={}", cfg.id.env_name);
|
||||
tracing::info!("Logging initialized");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user