File tree Expand file tree Collapse file tree 3 files changed +32
-1
lines changed
crates/rust-analyzer/src/tracing Expand file tree Collapse file tree 3 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -1187,6 +1187,15 @@ dependencies = [
11871187 " libc" ,
11881188]
11891189
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+
11901199[[package ]]
11911200name = " object"
11921201version = " 0.33.0"
@@ -2093,10 +2102,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
20932102checksum = " 5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
20942103dependencies = [
20952104 " deranged" ,
2105+ " itoa" ,
2106+ " libc" ,
20962107 " num-conv" ,
2108+ " num_threads" ,
20972109 " powerfmt" ,
20982110 " serde" ,
20992111 " time-core" ,
2112+ " time-macros" ,
21002113]
21012114
21022115[[package ]]
@@ -2105,6 +2118,16 @@ version = "0.1.2"
21052118source = " registry+https://github.com/rust-lang/crates.io-index"
21062119checksum = " ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
21072120
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+
21082131[[package ]]
21092132name = " tinyvec"
21102133version = " 1.8.0"
@@ -2213,6 +2236,7 @@ checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b"
22132236dependencies = [
22142237 " sharded-slab" ,
22152238 " thread_local" ,
2239+ " time" ,
22162240 " tracing-core" ,
22172241 " tracing-log" ,
22182242]
Original file line number Diff line number Diff line change @@ -153,6 +153,9 @@ tracing-tree = "0.3.0"
153153tracing-subscriber = { version = " 0.3.18" , default-features = false , features = [
154154 " registry" ,
155155 " fmt" ,
156+ " local-time" ,
157+ " std" ,
158+ " time" ,
156159 " tracing-log" ,
157160] }
158161triomphe = { 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;
77use tracing:: level_filters:: LevelFilter ;
88use tracing_subscriber:: {
99 filter:: { filter_fn, Targets } ,
10- fmt:: MakeWriter ,
10+ fmt:: { time , MakeWriter } ,
1111 layer:: SubscriberExt ,
1212 Layer , Registry ,
1313} ;
5858 let writer = self . writer ;
5959
6060 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+ )
6165 . with_target ( false )
6266 . with_ansi ( false )
6367 . with_writer ( writer)
You can’t perform that action at this time.
0 commit comments