Skip to content

Commit 3a14e30

Browse files
committed
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
2 parents 248a557 + 5aefe78 commit 3a14e30

File tree

1 file changed

+2
-2
lines changed
  • src/tools/rust-analyzer/crates/rust-analyzer/src

1 file changed

+2
-2
lines changed

src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ impl GlobalState {
689689
self.fetch_workspaces_queue
690690
.op_completed(Some((workspaces, force_reload_crate_graph)));
691691
if let Err(e) = self.fetch_workspace_error() {
692-
error!("FetchWorkspaceError:\n{e}");
692+
error!("FetchWorkspaceError: {e}");
693693
}
694694
self.wants_to_switch = Some("fetched workspace".to_owned());
695695
(Progress::End, None)
@@ -729,7 +729,7 @@ impl GlobalState {
729729
BuildDataProgress::End(build_data_result) => {
730730
self.fetch_build_data_queue.op_completed(build_data_result);
731731
if let Err(e) = self.fetch_build_data_error() {
732-
error!("FetchBuildDataError:\n{e}");
732+
error!("FetchBuildDataError: {e}");
733733
}
734734

735735
if self.wants_to_switch.is_none() {

0 commit comments

Comments
 (0)