Closed oli-obk closed 1 year ago
@hawkw opinions on this style? Your original proposal was slightly different, but I don't know if that was important to you or just one option to get the indentation right.
I can also use -
instead of spaces when lines are being used for indentation. This way we'd get something like
1:main┐basic::hierarchical-example version=0.1
1:main├┐basic::hierarchical-example version=0.1
1:main│└┐basic::server host="localhost", port=8080
1:main│ ├───0ms INFO basic starting
1:main│ ├───3s INFO basic listening
1:main│ ├┐basic::server host="localhost", port=8080
1:main│ │└┐basic::conn peer_addr="82.9.9.9", port=42381
1:main│ │ ├───0ms DEBUG basic connected
1:main│ │ ├─300ms DEBUG basic message received, length=2
1:main│ │┌┘basic::conn peer_addr="82.9.9.9", port=42381
1:main│ ├┘basic::server host="localhost", port=8080
1:main│ ├┐basic::server host="localhost", port=8080
1:main│ │└┐basic::conn peer_addr="8.8.8.8", port=18230
1:main│ │ ├─300ms DEBUG basic connected
For what it's worth, I think this looks reasonable. Do you think it should build atop to https://github.com/davidbarsky/tracing-tree/pull/56/?
Yea, it's easier for me to Rebase than for someone to rebase over this PR
fixes #13
I opted to always make the
ms
be in the same position by moving to second/minute numbers after999ms
and after59s
respectively. Once we get into minute territory, having very long numbers doesn't really matter for tracing imo. We'll easily be able to add hours or days if that becomes desirable.The basic example now looks like
instead of