sk_core/
logging.rs

1use tracing_subscriber::fmt::format::FmtSpan;
2
3pub fn setup(env_filter: &str) {
4    tracing_subscriber::fmt()
5        .with_file(true)
6        .with_line_number(true)
7        .with_span_events(FmtSpan::NEW)
8        .with_target(false)
9        .with_env_filter(env_filter)
10        .compact()
11        .init();
12}
13
14pub fn setup_for_cli(env_filter: &str) {
15    tracing_subscriber::fmt()
16        .with_target(false)
17        .with_env_filter(env_filter)
18        .without_time()
19        .compact()
20        .init();
21}