mirror of
https://codeberg.org/Toasterson/ips.git
synced 2026-04-10 13:20:42 +00:00
- Added initial implementation of the `pkg6depotd` server with modular components for CLI parsing, configuration management, HTTP handling, repository access, and daemonization. - Implemented basic server startup logic with a default router and placeholder handlers. - Integrated telemetry initialization and configuration fallback mechanism for ease of development. - Updated `Cargo.toml` and `Cargo.lock` to include dependencies necessary for server functionality.
15 lines
477 B
Rust
15 lines
477 B
Rust
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter};
|
|
use crate::config::Config;
|
|
|
|
pub fn init(_config: &Config) {
|
|
let env_filter = EnvFilter::try_from_default_env()
|
|
.unwrap_or_else(|_| EnvFilter::new("info,pkg6depotd=debug"));
|
|
|
|
let registry = tracing_subscriber::registry()
|
|
.with(env_filter)
|
|
.with(tracing_subscriber::fmt::layer());
|
|
|
|
// TODO: Add OTLP layer if configured in _config
|
|
|
|
registry.init();
|
|
}
|