File tree 3 files changed +32
-1
lines changed
crates/rust-analyzer/src/tracing
3 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -1187,6 +1187,15 @@ dependencies = [
1187
1187
" libc" ,
1188
1188
]
1189
1189
1190
+ [[package ]]
1191
+ name = " num_threads"
1192
+ version = " 0.1.7"
1193
+ source = " registry+https://github.com/rust-lang/crates.io-index"
1194
+ checksum = " 5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9"
1195
+ dependencies = [
1196
+ " libc" ,
1197
+ ]
1198
+
1190
1199
[[package ]]
1191
1200
name = " object"
1192
1201
version = " 0.33.0"
@@ -2093,10 +2102,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
2093
2102
checksum = " 5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
2094
2103
dependencies = [
2095
2104
" deranged" ,
2105
+ " itoa" ,
2106
+ " libc" ,
2096
2107
" num-conv" ,
2108
+ " num_threads" ,
2097
2109
" powerfmt" ,
2098
2110
" serde" ,
2099
2111
" time-core" ,
2112
+ " time-macros" ,
2100
2113
]
2101
2114
2102
2115
[[package ]]
@@ -2105,6 +2118,16 @@ version = "0.1.2"
2105
2118
source = " registry+https://github.com/rust-lang/crates.io-index"
2106
2119
checksum = " ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
2107
2120
2121
+ [[package ]]
2122
+ name = " time-macros"
2123
+ version = " 0.2.18"
2124
+ source = " registry+https://github.com/rust-lang/crates.io-index"
2125
+ checksum = " 3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
2126
+ dependencies = [
2127
+ " num-conv" ,
2128
+ " time-core" ,
2129
+ ]
2130
+
2108
2131
[[package ]]
2109
2132
name = " tinyvec"
2110
2133
version = " 1.8.0"
@@ -2213,6 +2236,7 @@ checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b"
2213
2236
dependencies = [
2214
2237
" sharded-slab" ,
2215
2238
" thread_local" ,
2239
+ " time" ,
2216
2240
" tracing-core" ,
2217
2241
" tracing-log" ,
2218
2242
]
Original file line number Diff line number Diff line change @@ -153,6 +153,9 @@ tracing-tree = "0.3.0"
153
153
tracing-subscriber = { version = " 0.3.18" , default-features = false , features = [
154
154
" registry" ,
155
155
" fmt" ,
156
+ " local-time" ,
157
+ " std" ,
158
+ " time" ,
156
159
" tracing-log" ,
157
160
] }
158
161
triomphe = { version = " 0.1.10" , default-features = false , features = [" std" ] }
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ use anyhow::Context;
7
7
use tracing:: level_filters:: LevelFilter ;
8
8
use tracing_subscriber:: {
9
9
filter:: { filter_fn, Targets } ,
10
- fmt:: MakeWriter ,
10
+ fmt:: { time , MakeWriter } ,
11
11
layer:: SubscriberExt ,
12
12
Layer , Registry ,
13
13
} ;
58
58
let writer = self . writer ;
59
59
60
60
let ra_fmt_layer = tracing_subscriber:: fmt:: layer ( )
61
+ . with_timer (
62
+ time:: OffsetTime :: local_rfc_3339 ( )
63
+ . expect ( "Could not get local offset, make sure you're on the main thread" ) ,
64
+ )
61
65
. with_target ( false )
62
66
. with_ansi ( false )
63
67
. with_writer ( writer)
You can’t perform that action at this time.
0 commit comments