switch log crate to tracing

This commit is contained in:
Dezhi Wu
2021-08-15 20:46:13 +08:00
parent d15f646ff1
commit ba0947dded
48 changed files with 277 additions and 239 deletions

View File

@@ -88,7 +88,7 @@ impl<'a> RequestDispatcher<'a> {
pub(crate) fn finish(&mut self) {
if let Some(req) = self.req.take() {
log::error!("unknown request: {:?}", req);
tracing::error!("unknown request: {:?}", req);
let response = lsp_server::Response::new_err(
req.id,
lsp_server::ErrorCode::MethodNotFound as i32,
@@ -208,7 +208,7 @@ impl<'a> NotificationDispatcher<'a> {
pub(crate) fn finish(&mut self) {
if let Some(not) = &self.not {
if !not.method.starts_with("$/") {
log::error!("unhandled notification: {:?}", not);
tracing::error!("unhandled notification: {:?}", not);
}
}
}