diff --git a/plugin/src/plugin.rs b/plugin/src/plugin.rs index 739d3d9..b715c58 100644 --- a/plugin/src/plugin.rs +++ b/plugin/src/plugin.rs @@ -70,7 +70,7 @@ impl log::Log for Log { let level: LogLevel = record.level().into(); let msg = record.args(); - let mut writer = io::stdout(); + let mut writer = std::io::stdout(); let mut payload = init_payload(); add_str(&mut payload, "level", &level.to_string()); add_str(&mut payload, "message", &format!("{msg}")); @@ -81,13 +81,10 @@ impl log::Log for Log { params: payload, }; - let _ = tokio::task::spawn(async move { - writer - .write_all(serde_json::to_string(&request).unwrap().as_bytes()) - .await - .unwrap(); - writer.flush().await.unwrap(); - }); + writer + .write_all(serde_json::to_string(&request).unwrap().as_bytes()) + .unwrap(); + writer.flush().unwrap(); } }