mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-22 20:38:21 +00:00
Logs: only truncate the message if it's possible it will need it
Change-type: patch
This commit is contained in:
parent
34cf8b6708
commit
c5d0eafea9
@ -93,12 +93,12 @@ export class BalenaLogBackend extends LogBackend {
|
||||
}
|
||||
|
||||
message.timestamp ??= Date.now();
|
||||
message.message ??= '';
|
||||
|
||||
message.message = _.truncate(message.message, {
|
||||
length: MAX_LOG_LENGTH,
|
||||
omission: '[...]',
|
||||
});
|
||||
message.message = message.message
|
||||
? _.truncate(message.message, {
|
||||
length: MAX_LOG_LENGTH,
|
||||
omission: '[...]',
|
||||
})
|
||||
: '';
|
||||
|
||||
this.write(message);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user