refactor: include binary name in crates_to_filter for logging (#1689)

This commit is contained in:
Sanchith Hegde
2023-07-12 17:00:32 +05:30
committed by GitHub
parent 5216d22efc
commit 123b34c7dc
11 changed files with 306 additions and 43 deletions

View File

@ -5,7 +5,10 @@ pub mod logger {
pub use router_env::{log, logger::*};
/// Setup logging sub-system.
pub fn setup(conf: &config::Log) -> TelemetryGuard {
router_env::setup(conf, router_env::service_name!(), ["actix_server"])
pub fn setup(
conf: &config::Log,
crates_to_filter: impl AsRef<[&'static str]>,
) -> TelemetryGuard {
router_env::setup(conf, router_env::service_name!(), crates_to_filter)
}
}