#tracing #log #config #init #convenient

clia-tracing-config

A convenient tracing config and init lib, with symlinking and local timezone

6 releases

0.2.5 Oct 25, 2022
0.2.4 Oct 22, 2022
0.1.0 Sep 21, 2022

#253 in Debugging

Download history 35/week @ 2023-06-02 24/week @ 2023-06-09 56/week @ 2023-06-16 37/week @ 2023-06-23 51/week @ 2023-06-30 37/week @ 2023-07-07 23/week @ 2023-07-14 40/week @ 2023-07-21 20/week @ 2023-07-28 32/week @ 2023-08-04 27/week @ 2023-08-11 36/week @ 2023-08-18 43/week @ 2023-08-25 26/week @ 2023-09-01 29/week @ 2023-09-08 30/week @ 2023-09-15

135 downloads per month
Used in 6 crates

MIT license

13KB
222 lines

clia-tracing-config

A convenient tracing config and init lib, with symlinking and local timezone.

image

Use these formats default, and can be configured:

  • pretty()
  • with_level(true)
  • with_target(true)
  • with_thread_ids(true)
  • with_thread_names(true)
  • with_source_location(true)

Usage

Code example and default values:

let _guard = clia_tracing_config::build()
    .filter_level("info")
    .with_ansi(true)
    .to_stdout(false)
    .directory("./logs")
    .file_name("my-service.log")
    .rolling("daily")
    .init();

tracing::info!("logged by tracing");
log::info!("logged by tracing");

rolling supports:

  • minutely
  • hourly
  • daily
  • never

lib.rs:

A convenient tracing config and init lib, with symlinking and local timezone.

Dependencies

~6–8.5MB
~148K SLoC