#tracing-subscriber #formatter #tracing-formatter #glog

tracing-glog

a glog-inspired formatter for tracing-subscriber

8 releases

0.4.1 Jul 10, 2025
0.4.0 Apr 12, 2024
0.3.0 Aug 7, 2023
0.2.3 Aug 7, 2023
0.1.1 Dec 1, 2021

#391 in Debugging

Download history 1761/week @ 2025-09-29 1677/week @ 2025-10-06 2056/week @ 2025-10-13 1129/week @ 2025-10-20 1743/week @ 2025-10-27 1206/week @ 2025-11-03 1524/week @ 2025-11-10 1386/week @ 2025-11-17 629/week @ 2025-11-24 1854/week @ 2025-12-01 1581/week @ 2025-12-08 1502/week @ 2025-12-15 844/week @ 2025-12-22 634/week @ 2025-12-29 1531/week @ 2026-01-05 1722/week @ 2026-01-12

4,826 downloads per month
Used in 9 crates

MIT/Apache

37KB
685 lines

tracing-glog

tracing-glog is a glog-inspired formatter for tracing-subscriber.

tracing-glog should be used with tracing-subscriber, as it is a formatter that tracing-subscriber's fmt::Subscriber and fmt::Layer can use to format events in a glog-inspired fashion.

Examples

With fmt::Subscriber:

use tracing_glog::{Glog, GlogFields};

tracing_subscriber::fmt()
    .event_format(Glog::default())
    .fmt_fields(GlogFields::default())
    .init();

With tracing_subscriber::fmt::Layer:

use tracing_subscriber::prelude::*;
use tracing_subscriber::{fmt, Registry};
use tracing_glog::{Glog, GlogFields};

let fmt = fmt::Layer::default()
    .event_format(Glog::default())
    .fmt_fields(GlogFields::default());

let subscriber = Registry::default().with(fmt);
tracing::subscriber::set_global_default(subscriber).expect("Unable to set global subscriber");

Dependencies

~7–12MB
~132K SLoC