mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-20 22:23:13 +00:00
commit
cafd8e89e5
@ -88,22 +88,17 @@ export class BalenaLogBackend extends LogBackend {
|
||||
return;
|
||||
}
|
||||
|
||||
message = Object.assign(
|
||||
{
|
||||
timestamp: Date.now(),
|
||||
message: '',
|
||||
},
|
||||
message,
|
||||
);
|
||||
|
||||
if (!message.isSystem && message.serviceId == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
message.message = _.truncate(message.message, {
|
||||
message.timestamp ??= Date.now();
|
||||
message.message = message.message
|
||||
? _.truncate(message.message, {
|
||||
length: MAX_LOG_LENGTH,
|
||||
omission: '[...]',
|
||||
});
|
||||
})
|
||||
: '';
|
||||
|
||||
this.write(message);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user