Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andylokandy committed Aug 2, 2024
1 parent ced7714 commit babb1fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/append/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ pub struct Stdout;

impl Append for Stdout {
fn append(&self, record: &log::Record) -> anyhow::Result<()> {
writeln!(std::io::stdout(), "{}", record.args())?;
let bytes = format!("{}\n", record.args()).into_bytes();
std::io::stdout().write_all(&bytes)?;
Ok(())
}

Expand All @@ -35,7 +36,8 @@ pub struct Stderr;

impl Append for Stderr {
fn append(&self, record: &log::Record) -> anyhow::Result<()> {
writeln!(std::io::stderr(), "{}", record.args())?;
let bytes = format!("{}\n", record.args()).into_bytes();
std::io::stderr().write_all(&bytes)?;
Ok(())
}

Expand Down

0 comments on commit babb1fc

Please sign in to comment.