Truncate Debug
messages after 100 characters
This commit is contained in:
parent
3f44d331d9
commit
946bbd2683
@ -174,9 +174,13 @@ impl Debug {
|
||||
lines.push(key_value("Render:", self.render_durations.average()));
|
||||
lines.push(key_value("Message count:", self.message_count));
|
||||
lines.push(String::from("Last messages:"));
|
||||
lines.extend(
|
||||
self.last_messages.iter().map(|msg| format!(" {}", msg)),
|
||||
);
|
||||
lines.extend(self.last_messages.iter().map(|msg| {
|
||||
if msg.len() <= 100 {
|
||||
format!(" {}", msg)
|
||||
} else {
|
||||
format!(" {:.100}...", msg)
|
||||
}
|
||||
}));
|
||||
|
||||
lines
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user