fetch: Improve logging of clone
This commit is contained in:
parent
976b58ba7a
commit
e19c773a86
|
|
@ -103,13 +103,23 @@ where
|
||||||
let result = state
|
let result = state
|
||||||
.run(handle, &handshake, limit, remote, None)
|
.run(handle, &handshake, limit, remote, None)
|
||||||
.map_err(Error::Protocol);
|
.map_err(Error::Protocol);
|
||||||
|
let elapsed = start.elapsed().as_millis();
|
||||||
|
let rid = handle.repo.id();
|
||||||
|
|
||||||
log::debug!(
|
match &result {
|
||||||
target: "fetch",
|
Ok(_) => {
|
||||||
"Finished clone of {} ({}ms)",
|
log::debug!(
|
||||||
handle.repo.id(),
|
target: "fetch",
|
||||||
start.elapsed().as_millis(),
|
"Finished clone of {rid} from {remote} ({elapsed}ms)",
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
Err(e) => {
|
||||||
|
log::debug!(
|
||||||
|
target: "fetch",
|
||||||
|
"Clone of {rid} from {remote} failed with '{e}' ({elapsed}ms)",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -372,7 +372,7 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
fn worker_result(&mut self, task: TaskResult) {
|
fn worker_result(&mut self, task: TaskResult) {
|
||||||
log::trace!(
|
log::debug!(
|
||||||
target: "wire",
|
target: "wire",
|
||||||
"Received fetch result from worker for stream {}, remote {}: {:?}",
|
"Received fetch result from worker for stream {}, remote {}: {:?}",
|
||||||
task.stream, task.remote, task.result
|
task.stream, task.remote, task.result
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue