mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
switch log
crate to tracing
This commit is contained in:
parent
d15f646ff1
commit
ba0947dded
48 changed files with 277 additions and 239 deletions
|
@ -11,7 +11,7 @@ doctest = false
|
|||
[dependencies]
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = { version = "1.0", features = ["unbounded_depth"] }
|
||||
log = "0.4.8"
|
||||
tracing = "0.1"
|
||||
crossbeam-channel = "0.5.0"
|
||||
jod-thread = "0.1.1"
|
||||
memmap2 = "0.3.0"
|
||||
|
|
|
@ -93,7 +93,7 @@ fn read_json<'a>(
|
|||
// Some ill behaved macro try to use stdout for debugging
|
||||
// We ignore it here
|
||||
if !buf.starts_with('{') {
|
||||
log::error!("proc-macro tried to print : {}", buf);
|
||||
tracing::error!("proc-macro tried to print : {}", buf);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ fn read_json<'a>(
|
|||
}
|
||||
|
||||
fn write_json(out: &mut impl Write, msg: &str) -> io::Result<()> {
|
||||
log::debug!("> {}", msg);
|
||||
tracing::debug!("> {}", msg);
|
||||
out.write_all(msg.as_bytes())?;
|
||||
out.write_all(b"\n")?;
|
||||
out.flush()?;
|
||||
|
|
|
@ -54,7 +54,7 @@ impl ProcMacroProcessSrv {
|
|||
Ok(res) => res,
|
||||
Err(err) => {
|
||||
let result = self.process.child.try_wait();
|
||||
log::error!(
|
||||
tracing::error!(
|
||||
"proc macro server crashed, server process state: {:?}, server request error: {:?}",
|
||||
result,
|
||||
err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue