fix(pino): Add missing params in PrettyOptions (#42123)

* fix(pino): Add missing params in PrettyOptions

* Update types/pino/index.d.ts

Co-Authored-By: Adam Vigneaux <adam@adamvig.com>

Co-authored-by: Adam Vigneaux <adam@adamvig.com>
This commit is contained in:
Michel Nemnom 2020-02-06 17:29:52 +00:00 committed by GitHub
parent b1f0045f65
commit e3b0532870
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -11,6 +11,7 @@
// Cory Donkin <https://github.com/Cooryd>
// Adam Vigneaux <https://github.com/AdamVig>
// Austin Beer <https://github.com/austin-beer>
// Michel Nemnom <https://github.com/Pegase745>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.7
@ -461,6 +462,10 @@ declare namespace P {
* The key in the JSON object to use for timestamp display. Default: "time".
*/
timestampKey?: string;
/**
* Format output of message, e.g. {level} - {pid} will output message: INFO - 1123 Default: `false`.
*/
messageFormat?: false | string;
/**
* If set to true, will add color information to the formatted output message. Default: `false`.
*/

View File

@ -165,9 +165,11 @@ const pretty = pino({
crlf: false,
errorLikeObjectKeys: ['err', 'error'],
errorProps: '',
messageFormat: false,
ignore: '',
levelFirst: false,
messageKey: 'msg',
timestampKey: "timestamp",
timestampKey: 'timestamp',
translateTime: 'UTC:h:MM:ss TT Z',
search: 'foo == `bar`'
}