diff --git a/src/sinks/terminal/format.rs b/src/sinks/terminal/format.rs index 399c8a0e..8bfeb4fd 100644 --- a/src/sinks/terminal/format.rs +++ b/src/sinks/terminal/format.rs @@ -391,9 +391,18 @@ impl Display for LogLine { match self.content.len() { x if x > max_width => { - let partial: String = self.content.chars().take(max_width - 3).collect(); - partial.with(Color::Grey).fmt(f)?; - f.write_str("...")?; + let chunks = (x as f32 / max_width as f32).ceil() as usize; + let wrapped: String = self.content + .chars() + .enumerate() + .fold(String::new(), |acc, (i, c)| { + if i != 0 && i == chunks { + format!("{}\n{}", acc, c) + } else { + format!("{}{}", acc, c) + } + }); + wrapped.with(Color::Grey).fmt(f)?; } _ => { let full = &self.content[..];