Skip to content

Commit 70c2f67

Browse files
committed
Make span duration rendering optional and turn it off by default
1 parent bbe6596 commit 70c2f67

19 files changed

+375
-306
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tracing-tree"
3-
version = "0.3.1"
3+
version = "0.4.0"
44
authors = ["David Barsky <[email protected]>", "Nathan Whitaker", "Oli Scherer <[email protected]>"]
55
edition = "2018"
66
license = "MIT OR Apache-2.0"

examples/basic.stdout

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
1:main┐basic::hierarchical-example version=0.1
22
1:main└┐basic::hierarchical-example version=0.1
33
1:main └┐basic::server host="localhost", port=8080
4-
1:main ├─ Xms INFO basic starting
5-
1:main ├─ Xs INFO basic listening
4+
1:main ├─ INFO basic starting
5+
1:main ├─ INFO basic listening
66
1:main └┐basic::server host="localhost", port=8080
77
1:main └┐basic::conn peer_addr="82.9.9.9", port=42381
8-
1:main ├─ Xms DEBUG basic connected
9-
1:main ├─ Xms DEBUG basic message received, length=2
8+
1:main ├─ DEBUG basic connected
9+
1:main ├─ DEBUG basic message received, length=2
1010
1:main ┌┘basic::conn peer_addr="82.9.9.9", port=42381
1111
1:main ┌┘basic::server host="localhost", port=8080
1212
1:main └┐basic::server host="localhost", port=8080
1313
1:main └┐basic::conn peer_addr="8.8.8.8", port=18230
14-
1:main ├─ Xms DEBUG basic connected
14+
1:main ├─ DEBUG basic connected
1515
1:main ┌┘basic::conn peer_addr="8.8.8.8", port=18230
1616
1:main ┌┘basic::server host="localhost", port=8080
1717
1:main └┐basic::server host="localhost", port=8080
1818
1:main └┐basic::foomp 42 <- format string, normal_var=43
19-
1:main ├─ Xms ERROR basic hello
19+
1:main ├─ ERROR basic hello
2020
1:main ┌┘basic::foomp 42 <- format string, normal_var=43
2121
1:main ┌┘basic::server host="localhost", port=8080
2222
1:main └┐basic::server host="localhost", port=8080
2323
1:main └┐basic::conn peer_addr="82.9.9.9", port=42381
24-
1:main ├─ Xms WARN basic weak encryption requested, algo="xor"
25-
1:main ├─ Xms DEBUG basic response sent, length=8
26-
1:main ├─ Xms DEBUG basic disconnected
24+
1:main ├─ WARN basic weak encryption requested, algo="xor"
25+
1:main ├─ DEBUG basic response sent, length=8
26+
1:main ├─ DEBUG basic disconnected
2727
1:main ┌┘basic::conn peer_addr="82.9.9.9", port=42381
2828
1:main ┌┘basic::server host="localhost", port=8080
2929
1:main └┐basic::server host="localhost", port=8080
3030
1:main └┐basic::conn peer_addr="8.8.8.8", port=18230
31-
1:main ├─ Xms DEBUG basic message received, length=5
32-
1:main ├─ Xms DEBUG basic response sent, length=8
33-
1:main ├─ Xms DEBUG basic disconnected
31+
1:main ├─ DEBUG basic message received, length=5
32+
1:main ├─ DEBUG basic response sent, length=8
33+
1:main ├─ DEBUG basic disconnected
3434
1:main ┌┘basic::conn peer_addr="8.8.8.8", port=18230
3535
1:main ┌┘basic::server host="localhost", port=8080
36-
1:main ├─ Xs WARN basic internal error
37-
1:main ├─ Xs ERROR basic this is a log message
38-
1:main ├─ Xs INFO basic exit
36+
1:main ├─ WARN basic internal error
37+
1:main ├─ ERROR basic this is a log message
38+
1:main ├─ INFO basic exit
3939
1:main ┌┘basic::server host="localhost", port=8080
4040
1:main┌┘basic::hierarchical-example version=0.1
4141
1:main┘basic::hierarchical-example version=0.1

examples/basic_non_verbose.stdout

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
1:main┐basic_non_verbose::hierarchical-example version=0.1
22
1:main└─┐basic_non_verbose::server host="localhost", port=8080
3-
1:main ├─ Xms INFO basic_non_verbose starting
4-
1:main ├─ Xs INFO basic_non_verbose listening
3+
1:main ├─ INFO basic_non_verbose starting
4+
1:main ├─ INFO basic_non_verbose listening
55
1:main └─┐basic_non_verbose::conn peer_addr="82.9.9.9", port=42381
6-
1:main ├─ Xms DEBUG basic_non_verbose connected
7-
1:main ├─ Xms DEBUG basic_non_verbose message received, length=2
6+
1:main ├─ DEBUG basic_non_verbose connected
7+
1:main ├─ DEBUG basic_non_verbose message received, length=2
88
1:main ┌─┘
99
1:main └─┐basic_non_verbose::conn peer_addr="8.8.8.8", port=18230
10-
1:main ├─ Xms DEBUG basic_non_verbose connected
10+
1:main ├─ DEBUG basic_non_verbose connected
1111
1:main ┌─┘
1212
1:main └─┐basic_non_verbose::foomp 42 <- format string, normal_var=43
13-
1:main ├─ Xms ERROR basic_non_verbose hello
13+
1:main ├─ ERROR basic_non_verbose hello
1414
1:main ┌─┘
1515
1:main └─┐basic_non_verbose::conn peer_addr="82.9.9.9", port=42381
16-
1:main ├─ Xms WARN basic_non_verbose weak encryption requested, algo="xor"
17-
1:main ├─ Xms DEBUG basic_non_verbose response sent, length=8
18-
1:main ├─ Xms DEBUG basic_non_verbose disconnected
16+
1:main ├─ WARN basic_non_verbose weak encryption requested, algo="xor"
17+
1:main ├─ DEBUG basic_non_verbose response sent, length=8
18+
1:main ├─ DEBUG basic_non_verbose disconnected
1919
1:main ┌─┘
2020
1:main └─┐basic_non_verbose::conn peer_addr="8.8.8.8", port=18230
21-
1:main ├─ Xms DEBUG basic_non_verbose message received, length=5
22-
1:main ├─ Xms DEBUG basic_non_verbose response sent, length=8
23-
1:main ├─ Xms DEBUG basic_non_verbose disconnected
21+
1:main ├─ DEBUG basic_non_verbose message received, length=5
22+
1:main ├─ DEBUG basic_non_verbose response sent, length=8
23+
1:main ├─ DEBUG basic_non_verbose disconnected
2424
1:main ┌─┘
25-
1:main ├─ Xs WARN basic_non_verbose internal error
26-
1:main ├─ Xs ERROR basic_non_verbose this is a log message
27-
1:main ├─ Xs INFO basic_non_verbose exit
25+
1:main ├─ WARN basic_non_verbose internal error
26+
1:main ├─ ERROR basic_non_verbose this is a log message
27+
1:main ├─ INFO basic_non_verbose exit
2828
1:main┌─┘
2929
1:main┘

examples/basic_verbose_entry.stdout

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
1:main┐basic_verbose_entry::hierarchical-example version=0.1
22
1:main└┐basic_verbose_entry::hierarchical-example version=0.1
33
1:main └┐basic_verbose_entry::server host="localhost", port=8080
4-
1:main ├─ Xms INFO basic_verbose_entry starting
5-
1:main ├─ Xs INFO basic_verbose_entry listening
4+
1:main ├─ INFO basic_verbose_entry starting
5+
1:main ├─ INFO basic_verbose_entry listening
66
1:main └┐basic_verbose_entry::server host="localhost", port=8080
77
1:main └┐basic_verbose_entry::conn peer_addr="82.9.9.9", port=42381
8-
1:main ├─ Xms DEBUG basic_verbose_entry connected
9-
1:main ├─ Xms DEBUG basic_verbose_entry message received, length=2
8+
1:main ├─ DEBUG basic_verbose_entry connected
9+
1:main ├─ DEBUG basic_verbose_entry message received, length=2
1010
1:main ┌─┘
1111
1:main └┐basic_verbose_entry::server host="localhost", port=8080
1212
1:main └┐basic_verbose_entry::conn peer_addr="8.8.8.8", port=18230
13-
1:main ├─ Xms DEBUG basic_verbose_entry connected
13+
1:main ├─ DEBUG basic_verbose_entry connected
1414
1:main ┌─┘
1515
1:main └┐basic_verbose_entry::server host="localhost", port=8080
1616
1:main └┐basic_verbose_entry::foomp 42 <- format string, normal_var=43
17-
1:main ├─ Xms ERROR basic_verbose_entry hello
17+
1:main ├─ ERROR basic_verbose_entry hello
1818
1:main ┌─┘
1919
1:main └┐basic_verbose_entry::server host="localhost", port=8080
2020
1:main └┐basic_verbose_entry::conn peer_addr="82.9.9.9", port=42381
21-
1:main ├─ Xms WARN basic_verbose_entry weak encryption requested, algo="xor"
22-
1:main ├─ Xms DEBUG basic_verbose_entry response sent, length=8
23-
1:main ├─ Xms DEBUG basic_verbose_entry disconnected
21+
1:main ├─ WARN basic_verbose_entry weak encryption requested, algo="xor"
22+
1:main ├─ DEBUG basic_verbose_entry response sent, length=8
23+
1:main ├─ DEBUG basic_verbose_entry disconnected
2424
1:main ┌─┘
2525
1:main └┐basic_verbose_entry::server host="localhost", port=8080
2626
1:main └┐basic_verbose_entry::conn peer_addr="8.8.8.8", port=18230
27-
1:main ├─ Xms DEBUG basic_verbose_entry message received, length=5
28-
1:main ├─ Xms DEBUG basic_verbose_entry response sent, length=8
29-
1:main ├─ Xms DEBUG basic_verbose_entry disconnected
27+
1:main ├─ DEBUG basic_verbose_entry message received, length=5
28+
1:main ├─ DEBUG basic_verbose_entry response sent, length=8
29+
1:main ├─ DEBUG basic_verbose_entry disconnected
3030
1:main ┌─┘
31-
1:main ├─ Xs WARN basic_verbose_entry internal error
32-
1:main ├─ Xs ERROR basic_verbose_entry this is a log message
33-
1:main ├─ Xs INFO basic_verbose_entry exit
31+
1:main ├─ WARN basic_verbose_entry internal error
32+
1:main ├─ ERROR basic_verbose_entry this is a log message
33+
1:main ├─ INFO basic_verbose_entry exit
3434
1:main┌─┘
3535
1:main┘

examples/basic_verbose_exit.stdout

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
1:main┐basic_verbose_exit::hierarchical-example version=0.1
22
1:main└─┐basic_verbose_exit::server host="localhost", port=8080
3-
1:main ├─ Xms INFO basic_verbose_exit starting
4-
1:main ├─ Xs INFO basic_verbose_exit listening
3+
1:main ├─ INFO basic_verbose_exit starting
4+
1:main ├─ INFO basic_verbose_exit listening
55
1:main └─┐basic_verbose_exit::conn peer_addr="82.9.9.9", port=42381
6-
1:main ├─ Xms DEBUG basic_verbose_exit connected
7-
1:main ├─ Xms DEBUG basic_verbose_exit message received, length=2
6+
1:main ├─ DEBUG basic_verbose_exit connected
7+
1:main ├─ DEBUG basic_verbose_exit message received, length=2
88
1:main ┌┘basic_verbose_exit::conn peer_addr="82.9.9.9", port=42381
99
1:main ┌┘basic_verbose_exit::server host="localhost", port=8080
1010
1:main └─┐basic_verbose_exit::conn peer_addr="8.8.8.8", port=18230
11-
1:main ├─ Xms DEBUG basic_verbose_exit connected
11+
1:main ├─ DEBUG basic_verbose_exit connected
1212
1:main ┌┘basic_verbose_exit::conn peer_addr="8.8.8.8", port=18230
1313
1:main ┌┘basic_verbose_exit::server host="localhost", port=8080
1414
1:main └─┐basic_verbose_exit::foomp 42 <- format string, normal_var=43
15-
1:main ├─ Xms ERROR basic_verbose_exit hello
15+
1:main ├─ ERROR basic_verbose_exit hello
1616
1:main ┌┘basic_verbose_exit::foomp 42 <- format string, normal_var=43
1717
1:main ┌┘basic_verbose_exit::server host="localhost", port=8080
1818
1:main └─┐basic_verbose_exit::conn peer_addr="82.9.9.9", port=42381
19-
1:main ├─ Xms WARN basic_verbose_exit weak encryption requested, algo="xor"
20-
1:main ├─ Xms DEBUG basic_verbose_exit response sent, length=8
21-
1:main ├─ Xms DEBUG basic_verbose_exit disconnected
19+
1:main ├─ WARN basic_verbose_exit weak encryption requested, algo="xor"
20+
1:main ├─ DEBUG basic_verbose_exit response sent, length=8
21+
1:main ├─ DEBUG basic_verbose_exit disconnected
2222
1:main ┌┘basic_verbose_exit::conn peer_addr="82.9.9.9", port=42381
2323
1:main ┌┘basic_verbose_exit::server host="localhost", port=8080
2424
1:main └─┐basic_verbose_exit::conn peer_addr="8.8.8.8", port=18230
25-
1:main ├─ Xms DEBUG basic_verbose_exit message received, length=5
26-
1:main ├─ Xms DEBUG basic_verbose_exit response sent, length=8
27-
1:main ├─ Xms DEBUG basic_verbose_exit disconnected
25+
1:main ├─ DEBUG basic_verbose_exit message received, length=5
26+
1:main ├─ DEBUG basic_verbose_exit response sent, length=8
27+
1:main ├─ DEBUG basic_verbose_exit disconnected
2828
1:main ┌┘basic_verbose_exit::conn peer_addr="8.8.8.8", port=18230
2929
1:main ┌┘basic_verbose_exit::server host="localhost", port=8080
30-
1:main ├─ Xs WARN basic_verbose_exit internal error
31-
1:main ├─ Xs ERROR basic_verbose_exit this is a log message
32-
1:main ├─ Xs INFO basic_verbose_exit exit
30+
1:main ├─ WARN basic_verbose_exit internal error
31+
1:main ├─ ERROR basic_verbose_exit this is a log message
32+
1:main ├─ INFO basic_verbose_exit exit
3333
1:main ┌┘basic_verbose_exit::server host="localhost", port=8080
3434
1:main┌┘basic_verbose_exit::hierarchical-example version=0.1
3535
1:main┘basic_verbose_exit::hierarchical-example version=0.1

examples/concurrent.stdout

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
1:main┐concurrent::hierarchical-example version=0.1
22
1:main└───┐concurrent::server host="localhost", port=8080
3-
1:main ├─── Xms INFO concurrent starting
4-
1:main ├─── Xs INFO concurrent listening
5-
1:main ├─── Xs DEBUG concurrent starting countdowns
3+
1:main ├─── INFO concurrent starting
4+
1:main ├─── INFO concurrent listening
5+
1:main ├─── DEBUG concurrent starting countdowns
66
1:main └───┐concurrent::countdowns
77
1:main └───┐concurrent::countdown_a
8-
1:main ├─── Xms DEBUG concurrent polling countdown, label="a", count=3
8+
1:main ├─── DEBUG concurrent polling countdown, label="a", count=3
99
1:main └───┐concurrent::countdown_b
10-
1:main ├─── Xms DEBUG concurrent polling countdown, label="b", count=5
11-
1:main ├─── Xms DEBUG concurrent polling countdown, label="b", count=4
10+
1:main ├─── DEBUG concurrent polling countdown, label="b", count=5
11+
1:main ├─── DEBUG concurrent polling countdown, label="b", count=4
1212
1:main └───┐concurrent::countdown_a
13-
1:main ├─── Xms DEBUG concurrent polling countdown, label="a", count=2
13+
1:main ├─── DEBUG concurrent polling countdown, label="a", count=2
1414
1:main └───┐concurrent::conn peer_addr="82.9.9.9", port=42381
15-
1:main ├─── Xms WARN concurrent peer1 warning
15+
1:main ├─── WARN concurrent peer1 warning
1616
1:main └───┐concurrent::countdowns
17-
1:main ├─── Xms INFO concurrent finished polling countdowns
17+
1:main ├─── INFO concurrent finished polling countdowns
1818
1:main ┌───┘
1919
1:main ┌───┘
2020
1:main ┌───┘
2121
1:main ┌───┘
22-
1:main ├─── Xs INFO concurrent all done!
23-
1:main ├─── Xs INFO concurrent exit
22+
1:main ├─── INFO concurrent all done!
23+
1:main ├─── INFO concurrent exit
2424
1:main┌───┘
2525
1:main┘

examples/concurrent_eager.stdout

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
1:main└───┐concurrent_eager::b
77
1:main┐concurrent_eager::spawn_fut key="a"
88
1:main└───┐concurrent_eager::a
9-
1:main ├─── Xms INFO concurrent_eager a
9+
1:main ├─── INFO concurrent_eager a
1010
1:main┌───┘
1111
1:main┐concurrent_eager::spawn_fut key="b"
1212
1:main└───┐concurrent_eager::b
13-
1:main ├─── Xms INFO concurrent_eager b
13+
1:main ├─── INFO concurrent_eager b
1414
1:main┌───┘
1515
1:main┘
1616
1:main┘

examples/concurrent_verbose.stdout

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
1:main┐concurrent_verbose::hierarchical-example version=0.1
22
1:main└───┐concurrent_verbose::server host="localhost", port=8080
3-
1:main ├─── Xms INFO concurrent_verbose starting
4-
1:main ├─── Xs INFO concurrent_verbose listening
5-
1:main ├─── Xs DEBUG concurrent_verbose starting countdowns
3+
1:main ├─── INFO concurrent_verbose starting
4+
1:main ├─── INFO concurrent_verbose listening
5+
1:main ├─── DEBUG concurrent_verbose starting countdowns
66
1:main └─┐concurrent_verbose::server host="localhost", port=8080
77
1:main └─┐concurrent_verbose::countdowns
88
1:main └───┐concurrent_verbose::countdown_a
9-
1:main ├─── Xms DEBUG concurrent_verbose polling countdown, label="a", count=3
9+
1:main ├─── DEBUG concurrent_verbose polling countdown, label="a", count=3
1010
1:main └─┐concurrent_verbose::countdowns
1111
1:main └─┐concurrent_verbose::countdown_b
12-
1:main ├─── Xms DEBUG concurrent_verbose polling countdown, label="b", count=5
13-
1:main ├─── Xms DEBUG concurrent_verbose polling countdown, label="b", count=4
12+
1:main ├─── DEBUG concurrent_verbose polling countdown, label="b", count=5
13+
1:main ├─── DEBUG concurrent_verbose polling countdown, label="b", count=4
1414
1:main └─┐concurrent_verbose::countdowns
1515
1:main └─┐concurrent_verbose::countdown_a
16-
1:main ├─── Xms DEBUG concurrent_verbose polling countdown, label="a", count=2
16+
1:main ├─── DEBUG concurrent_verbose polling countdown, label="a", count=2
1717
1:main └─┐concurrent_verbose::server host="localhost", port=8080
1818
1:main └─┐concurrent_verbose::conn peer_addr="82.9.9.9", port=42381
19-
1:main ├─── Xms WARN concurrent_verbose peer1 warning
19+
1:main ├─── WARN concurrent_verbose peer1 warning
2020
1:main └─┐concurrent_verbose::server host="localhost", port=8080
2121
1:main └─┐concurrent_verbose::countdowns
22-
1:main ├─── Xms INFO concurrent_verbose finished polling countdowns
22+
1:main ├─── INFO concurrent_verbose finished polling countdowns
2323
1:main ┌─┘concurrent_verbose::countdown_b
2424
1:main ┌─┘concurrent_verbose::countdowns
2525
1:main ┌─┘concurrent_verbose::countdown_a
@@ -28,8 +28,8 @@
2828
1:main ┌─┘concurrent_verbose::server host="localhost", port=8080
2929
1:main ┌─┘concurrent_verbose::conn peer_addr="82.9.9.9", port=42381
3030
1:main ┌─┘concurrent_verbose::server host="localhost", port=8080
31-
1:main ├─── Xs INFO concurrent_verbose all done!
32-
1:main ├─── Xs INFO concurrent_verbose exit
31+
1:main ├─── INFO concurrent_verbose all done!
32+
1:main ├─── INFO concurrent_verbose exit
3333
1:main ┌─┘concurrent_verbose::server host="localhost", port=8080
3434
1:main┌─┘concurrent_verbose::hierarchical-example version=0.1
3535
1:main┘concurrent_verbose::hierarchical-example version=0.1

0 commit comments

Comments
 (0)