Skip to content

Commit b95fccd

Browse files
committed
logging: send the expected Log request
1 parent 22343f3 commit b95fccd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/logging.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ pub struct TerminalWriterMaker {
4141

4242
impl std::io::Write for RemoteWriter {
4343
fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
44-
Request::to(&self.target).body(buf).send().unwrap();
44+
let body = serde_json::json!({"Log": buf});
45+
let body = serde_json::to_vec(&body).unwrap();
46+
Request::to(&self.target).body(body).send().unwrap();
4547
Ok(buf.len())
4648
}
4749

0 commit comments

Comments
 (0)