diff options
| author | bors <bors@rust-lang.org> | 2024-08-29 04:52:11 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-08-29 04:52:11 +0000 |
| commit | 3a14e301ddbebd4a03bdb53fe8e2df20a4e8210c (patch) | |
| tree | e22f76e23bb3dfda20d014a60b0a2fe916b9e558 | |
| parent | 248a55723b5f4761bbce417bd64c5b79ac68d5bd (diff) | |
| parent | 5aefe78301cc5cb2146575cc99cb32fc44dbdc59 (diff) | |
| download | rust-3a14e301ddbebd4a03bdb53fe8e2df20a4e8210c.tar.gz rust-3a14e301ddbebd4a03bdb53fe8e2df20a4e8210c.zip | |
Auto merge of #17992 - Wilfred:newlines_in_logs, r=Veykril
internal: Avoid newlines in fetch errors
Most logs lines don't have newlines, ensure fetch errors follow this pattern. This makes it easier to see which log line is associated with the error.
Before:
2024-08-28T21:11:58.431856Z ERROR FetchWorkspaceError:
rust-analyzer failed to discover workspace
After:
2024-08-28T21:11:58.431856Z ERROR FetchWorkspaceError: rust-analyzer failed to discover workspace
| -rw-r--r-- | src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs index 1d4ee71e5c1..616d6b49351 100644 --- a/src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs +++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs @@ -689,7 +689,7 @@ impl GlobalState { self.fetch_workspaces_queue .op_completed(Some((workspaces, force_reload_crate_graph))); if let Err(e) = self.fetch_workspace_error() { - error!("FetchWorkspaceError:\n{e}"); + error!("FetchWorkspaceError: {e}"); } self.wants_to_switch = Some("fetched workspace".to_owned()); (Progress::End, None) @@ -729,7 +729,7 @@ impl GlobalState { BuildDataProgress::End(build_data_result) => { self.fetch_build_data_queue.op_completed(build_data_result); if let Err(e) = self.fetch_build_data_error() { - error!("FetchBuildDataError:\n{e}"); + error!("FetchBuildDataError: {e}"); } if self.wants_to_switch.is_none() { |
