Logs: skip setting default values if we're dropping as an invalid log

Change-type: patch
This commit is contained in:
Pagan Gazzard 2024-07-16 18:00:36 +01:00 committed by Felipe Lalanne
parent 0a817af10c
commit 34cf8b6708

View File

@ -88,13 +88,13 @@ export class BalenaLogBackend extends LogBackend {
return;
}
message.timestamp ??= Date.now();
message.message ??= '';
if (!message.isSystem && message.serviceId == null) {
return;
}
message.timestamp ??= Date.now();
message.message ??= '';
message.message = _.truncate(message.message, {
length: MAX_LOG_LENGTH,
omission: '[...]',