#tracing-subscriber #human-friendly #tracing

tracing-human-layer

A human-friendly tracing console output layer

6 releases

0.2.1 Sep 6, 2025
0.2.0 Sep 6, 2025
0.1.3 Dec 22, 2023
0.1.2 Nov 23, 2023
0.1.1 Oct 31, 2023

#259 in Debugging

Download history 5/week @ 2025-08-10 24/week @ 2025-08-17 84/week @ 2025-08-24 180/week @ 2025-08-31 150/week @ 2025-09-07 76/week @ 2025-09-14 121/week @ 2025-09-21 331/week @ 2025-09-28 202/week @ 2025-10-05 125/week @ 2025-10-12 117/week @ 2025-10-19 63/week @ 2025-10-26 45/week @ 2025-11-02 41/week @ 2025-11-09 40/week @ 2025-11-16 32/week @ 2025-11-23

164 downloads per month
Used in 5 crates

MIT license

210KB
1K SLoC

tracing-human-layer

docs.rs Crates.io

A human-friendly and colorful terminal output tracing_subscriber::Layer for tracing.

Features:

  • Line-wrapping (optional)
  • Colorful output (customizable and optional)
  • Blank lines between long log messages
  • One-line format for short log messages with one short field

A screenshot of tracing-human-layer output

Quick start

use tracing_subscriber::layer::SubscriberExt;
use tracing_subscriber::util::SubscriberInitExt;
use tracing_human_layer::HumanLayer;

tracing_subscriber::registry()
  .with(HumanLayer::new())
  .init();

Performance

TL;DR: Half of the cost of logging is writing to stderr.

I haven't done too much performance work on tracing-human-layer, but I do have a couple benchmarks. It seems to take 1.92-6.17µs to format an event (including emitting a span and event), with the exact cost depending on whether or not color output (HumanLayer::with_color_output) or text wrapping (HumanLayer::with_textwrap_options) is enabled.

Formatting an event and writing it to stderr takes 12.55µs, so actually showing the logs to the user is about 2× slower than just formatting them.

Dependencies

~5–18MB
~198K SLoC