chore: move some functions to Cli struct (#3961)

This commit is contained in:
Matthias Seitz
2023-07-27 18:13:45 +02:00
committed by GitHub
parent fc431bc545
commit 2aae8c82e7
4 changed files with 54 additions and 35 deletions

View File

@ -11,5 +11,5 @@ description = "tracing helpers"
[dependencies]
tracing.workspace = true
tracing-subscriber = { version = "0.3", default-features = false, features = ["env-filter", "fmt"] }
tracing-appender = "0.2"
tracing-appender.workspace = true
tracing-journald = "0.3"

View File

@ -68,6 +68,7 @@ where
///
/// The boxed layer and a guard is returned. When the guard is dropped the buffer for the log
/// file is immediately flushed to disk. Any events after the guard is dropped may be missed.
#[must_use = "tracing guard must be kept alive to flush events to disk"]
pub fn file<S>(
filter: EnvFilter,
dir: impl AsRef<Path>,