mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-02 03:56:41 +00:00
Logs: skip setting default values if we're dropping as an invalid log
Change-type: patch
This commit is contained in:
parent
0a817af10c
commit
34cf8b6708
@ -88,13 +88,13 @@ export class BalenaLogBackend extends LogBackend {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
message.timestamp ??= Date.now();
|
|
||||||
message.message ??= '';
|
|
||||||
|
|
||||||
if (!message.isSystem && message.serviceId == null) {
|
if (!message.isSystem && message.serviceId == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message.timestamp ??= Date.now();
|
||||||
|
message.message ??= '';
|
||||||
|
|
||||||
message.message = _.truncate(message.message, {
|
message.message = _.truncate(message.message, {
|
||||||
length: MAX_LOG_LENGTH,
|
length: MAX_LOG_LENGTH,
|
||||||
omission: '[...]',
|
omission: '[...]',
|
||||||
|
Loading…
Reference in New Issue
Block a user