rust-analyzer
rust-analyzer copied to clipboard
internal: Use local time when formatting logs
When debugging rust-analyzer and looking at logs, it's much easier to read when the timestamp is in the local timezone.
Before:
2024-08-28T20:55:38.792321Z INFO ParseQuery: invoked at R18460
After:
2024-08-28T13:55:38.792321-07:00 INFO ParseQuery: invoked at R18460
It is sad to introduce a dependency just for that...
I agree, I'd rather not pull in a time library just for this
Can we use OffsetTime (using time, which we already pull in) or SystemTime instead?
rust-analyzer might not be able to use OffsetTime without introducing some unsafe code, but I think SystemTime might be reasonable for user-facing logs.
(I think if rust-analyzer ever used something like OpenTelemetry for emitting a bunch of traces—I want that for Reasons™—then those should be UTC via time.)
:umbrella: The latest upstream changes (presumably #18227) made this pull request unmergeable. Please resolve the merge conflicts.
Needs a rebase @bors delegate=Wilfred
:v: @Wilfred, you can now approve this pull request!
If @Veykril told you to "r=me" after making some further change, please make that change, then do @bors r=@Veykril
@bors r=@Veykril
:pushpin: Commit 36b9f099170a6f80b65c4d4ef54957d6005c13da has been approved by Veykril
It is now in the queue for this repository.
:hourglass: Testing commit 36b9f099170a6f80b65c4d4ef54957d6005c13da with merge a439ed8b8a667c0420f53a2b7f116c1cc8fed4e4...
:sunny: Test successful - checks-actions Approved by: Veykril Pushing a439ed8b8a667c0420f53a2b7f116c1cc8fed4e4 to master...
:sunny: Test successful - checks-actions Approved by: Veykril Pushing a439ed8b8a667c0420f53a2b7f116c1cc8fed4e4 to master...
:eyes: Test was successful, but fast-forwarding failed: 422 Changes must be made through a pull request.