From 7166c2886b4bc547a4e49df6c09a1285d8103ee2 Mon Sep 17 00:00:00 2001 From: Igor Savin Date: Mon, 27 May 2019 02:29:14 +0200 Subject: [PATCH 1/2] Document new config option (implemented in https://github.com/pinojs/pino-pretty/pull/67) --- types/pino/index.d.ts | 4 ++++ types/pino/pino-tests.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/types/pino/index.d.ts b/types/pino/index.d.ts index ae7e9da522a451..61ef9db19f28ca 100644 --- a/types/pino/index.d.ts +++ b/types/pino/index.d.ts @@ -259,6 +259,10 @@ declare namespace P { * The key in the JSON object to use as the highlighted message. Default: "msg". */ messageKey?: string; + /** + * The key in the JSON object to use for timestamp display. Default: "time". + */ + timestampKey?: string; /** * If set to true, will add color information to the formatted output message. Default: `false`. */ diff --git a/types/pino/pino-tests.ts b/types/pino/pino-tests.ts index 1a64f11d99158e..7f5fb44a940449 100644 --- a/types/pino/pino-tests.ts +++ b/types/pino/pino-tests.ts @@ -133,6 +133,7 @@ const pretty = pino({ errorProps: '', levelFirst: false, messageKey: 'msg', + timestampKey: "timestamp", translateTime: 'UTC:h:MM:ss TT Z', search: 'foo == `bar`' } From dcddf437cf1435aca5e0c67b81b6ddc0354bc4db Mon Sep 17 00:00:00 2001 From: Igor Savin Date: Mon, 27 May 2019 02:37:27 +0200 Subject: [PATCH 2/2] Fix indentation to be consistent --- types/pino/pino-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/pino/pino-tests.ts b/types/pino/pino-tests.ts index 7f5fb44a940449..5c87a24ece1ec2 100644 --- a/types/pino/pino-tests.ts +++ b/types/pino/pino-tests.ts @@ -133,7 +133,7 @@ const pretty = pino({ errorProps: '', levelFirst: false, messageKey: 'msg', - timestampKey: "timestamp", + timestampKey: "timestamp", translateTime: 'UTC:h:MM:ss TT Z', search: 'foo == `bar`' }