1
0
mirror of https://github.com/bitwarden/server synced 2026-02-08 04:33:23 +00:00

Allow for RUST_LOG module-level logging settings for tracing

This commit is contained in:
Matt Gibson
2026-01-15 05:16:21 -08:00
parent 9be303cddb
commit 9552c6e9e1
2 changed files with 9 additions and 5 deletions

View File

@@ -21,7 +21,7 @@ thiserror = { workspace = true }
tokio-util = { version = "0.7.16", features = ["compat"] }
tokio = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
uuid = { workspace = true }
async-std = { version = "1.13.2", features = ["attributes"] }
subtle = "2.6.1"

View File

@@ -2,16 +2,20 @@
//! Write permissions are needed to the underlying data stores.
//! There should only be one instance of this running at a time for a given AKD.
use publisher::start;
use tracing::info;
use tracing::level_filters::LevelFilter;
use tracing_subscriber::EnvFilter;
use publisher::start;
use publisher::ApplicationConfig;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
tracing_subscriber::fmt()
.with_max_level(tracing::Level::TRACE)
.init();
let env_filter = EnvFilter::builder()
.with_default_directive(LevelFilter::INFO.into())
.from_env_lossy();
tracing_subscriber::fmt().with_env_filter(env_filter).init();
// Load configuration
let config = ApplicationConfig::load()