mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-14 18:10:39 +09:00
fix: use SYS: prefix in pino-pretty translateTime to honour TZ env var
pino-pretty's translateTime: "HH:MM:ss" formats all timestamps in UTC, ignoring the process TZ environment variable. Changing the prefix to "SYS:HH:MM:ss" instructs pino-pretty to format timestamps in the local system timezone, so operators running in non-UTC zones see correct wall-clock times in both the console and the server.log file. Fixes: #2879
This commit is contained in:
parent
6c8569156c
commit
8d20510b9a
2 changed files with 88 additions and 1 deletions
|
|
@ -21,7 +21,7 @@ fs.mkdirSync(logDir, { recursive: true });
|
|||
const logFile = path.join(logDir, "server.log");
|
||||
|
||||
const sharedOpts = {
|
||||
translateTime: "HH:MM:ss",
|
||||
translateTime: "SYS:HH:MM:ss",
|
||||
ignore: "pid,hostname",
|
||||
singleLine: true,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue