refactor: Use error!(e; xxx) pattern to log error (#195)

Use `error!(e; xxx)` pattern so we could get backtrace in error log.

Also use BoxedError as error source of ExecuteQuery instead of String,
so we could carry backtrace and other info in it.
This commit is contained in:
evenyag
2022-08-23 17:35:24 +08:00
committed by GitHub
parent ad14c83369
commit 8ea2aa73cf
6 changed files with 27 additions and 29 deletions

View File

@@ -359,11 +359,7 @@ impl WriterInner {
// TODO(yingwen): We should release the write lock during waiting flush done, which
// needs something like async condvar.
flush_handle.join().await.map_err(|e| {
logging::error!(
"Previous flush job failed, region: {}, err: {}",
shared.name,
e
);
logging::error!(e; "Previous flush job failed, region: {}", shared.name);
e
})?;
}