aboutsummaryrefslogtreecommitdiff
path: root/helix-lsp/src
diff options
context:
space:
mode:
authorBlaž Hrastnik2020-10-23 05:33:09 +0000
committerBlaž Hrastnik2020-12-03 04:10:35 +0000
commitaf1924404adac399c351a17bc0f43b5e2889abbb (patch)
tree69b9a940b4d98f82233c1b61c52516a81bca7d59 /helix-lsp/src
parenteff6fac9ece0700f0ed8eb0a230b6816fa7cece7 (diff)
Configure logging (-vv for debug level logs)
Diffstat (limited to 'helix-lsp/src')
-rw-r--r--helix-lsp/src/transport.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/helix-lsp/src/transport.rs b/helix-lsp/src/transport.rs
index b30a8a6e..4ab3d5ec 100644
--- a/helix-lsp/src/transport.rs
+++ b/helix-lsp/src/transport.rs
@@ -1,5 +1,7 @@
use std::collections::HashMap;
+use log::debug;
+
use crate::{Error, Message, Notification};
type Result<T> = core::result::Result<T, Error>;
@@ -114,7 +116,7 @@ impl Transport {
}
pub async fn send(&mut self, request: String) -> anyhow::Result<()> {
- // println!("-> {}", request);
+ debug!("-> {}", request);
// send the headers
self.writer
@@ -135,11 +137,11 @@ impl Transport {
Message::Notification(jsonrpc::Notification { method, params, .. }) => {
let notification = Notification::parse(&method, params);
- // println!("<- {} {:?}", method, notification);
+ debug!("<- {} {:?}", method, notification);
self.incoming.send(notification).await?;
}
- Message::Call(_call) => {
- // println!("<- {:?}", call);
+ Message::Call(call) => {
+ debug!("<- {:?}", call);
// dispatch
}
};
@@ -149,7 +151,7 @@ impl Transport {
pub async fn recv_response(&mut self, output: jsonrpc::Output) -> anyhow::Result<()> {
match output {
jsonrpc::Output::Success(jsonrpc::Success { id, result, .. }) => {
- // println!("<- {}", result);
+ debug!("<- {}", result);
let tx = self
.pending_requests