tilt: ^T toggles log timestamps#1274
Conversation
59a7ddc to
8139916
Compare
| l := logger.Get(ctx) | ||
| if firstBuild { | ||
| p := logger.Blue(l).Sprintf("\n──┤ Building: ") | ||
| p := logger.Blue(l).Sprintf("──┤ Building: ") |
There was a problem hiding this comment.
There's a bug in this PR (and also the existing PrefixedWriter) - if something logs a colored newline, that color will also affect that next line's timestamp/prefix.
This is annoying enough to fix and low enough impact (colored prefixes!) that I figured band-aiding it for now is fine.
8139916 to
3095332
Compare
|
Hmm so this won't work with |
Correct. Do you think we should care? Do we know of users using |
afaik, just us, so go ahead and land and we can figure out a way to add timestamps for |
Behavior:
^T toggles timestampped logging
While it's on, all lines are preceded by timestamps.
There is no retroactive adding of timestamps to old lines, and if you turn timestamps back off, the timestamps remain on the old lines.
It's possible at some point we'll save logs with more structure and are able to apply this retroactively, but that didn't seem worth tackling right now.
Leaving this as kind of a hidden feature for now. Filed https://app.clubhouse.io/windmill/story/1798/add-documentation-for-rarer-shortcut-keys to make it discoverable.
It's pretty ugly at default terminal width:
