Commit 33f27d1
committed
fix: Handle missing time offsets gracefully
The tracing_subscribe docs state that missing offsets likely mean
that we're in a multithreaded context:
https://docs.rs/tracing-subscriber/latest/tracing_subscriber/fmt/time/struct.OffsetTime.html#method.local_rfc_3339
We're not in a multithreaded context at this point, but some platforms
(e.g. OpenBSD) still don't have time offsets available.
Since this is only a rust-analyzer debugging convenience, just use
system time logging in this situation.
Fixes rust-lang#183841 parent 1fbaccd commit 33f27d1
File tree
1 file changed
+14
-6
lines changed- src/tools/rust-analyzer/crates/rust-analyzer/src/tracing
1 file changed
+14
-6
lines changedLines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | 61 | | |
66 | 62 | | |
67 | | - | |
68 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
69 | 77 | | |
70 | 78 | | |
71 | 79 | | |
| |||
0 commit comments