mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-03-22 12:05:20 +00:00
logs: Change the timestamp format to ISO 8601 UTC
Resolves: #2608 Change-type: major
This commit is contained in:
parent
ca80bd52fe
commit
adb460b270
@ -155,12 +155,8 @@ export function displayLogObject<T extends Log>(
|
||||
system: boolean,
|
||||
filterServices?: string[],
|
||||
): void {
|
||||
let toPrint: string;
|
||||
if (obj.timestamp != null) {
|
||||
toPrint = `[${new Date(obj.timestamp).toLocaleString()}]`;
|
||||
} else {
|
||||
toPrint = `[${new Date().toLocaleString()}]`;
|
||||
}
|
||||
const d = obj.timestamp != null ? new Date(obj.timestamp) : new Date();
|
||||
let toPrint = `[${d.toISOString()}]`;
|
||||
|
||||
if (obj.serviceName != null) {
|
||||
if (filterServices) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user