File: README.md

package info (click to toggle)
rustc-web 1.78.0%2Bdfsg1-2~deb11u3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,245,360 kB
  • sloc: xml: 147,985; javascript: 18,022; sh: 11,083; python: 10,265; ansic: 6,172; cpp: 5,023; asm: 4,390; makefile: 4,269
file content (19 lines) | stat: -rw-r--r-- 678 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# tracing-tree

Instrument your application with [tracing](https://github.com/tokio-rs/tracing)
and get tree-structured summaries of your application activity with timing
information on the console:

https://github.com/davidbarsky/tracing-tree/blob/483cc0a118c3170f4246d6fa4a9f018a00d8f0a9/examples/quiet.stdout#L1-L28

(Format inspired by [slog-term](https://github.com/slog-rs/slog#terminal-output-example))

## Setup

After instrumenting your app with
[tracing](https://github.com/tokio-rs/tracing), add this subscriber like this:

```rust
let subscriber = Registry::default().with(HierarchicalLayer::new(2));
tracing::subscriber::set_global_default(subscriber).unwrap();
```