diff --git a/pino/pino-tests.ts b/pino/pino-tests.ts index 9a2c423222..4a1470db24 100644 --- a/pino/pino-tests.ts +++ b/pino/pino-tests.ts @@ -26,6 +26,12 @@ var instance = PINO({ } }) +var pretty = PINO.pretty() +var instance2 = PINO({ + name: 'app', + safe: true +}, pretty) + var logger = instance logger.child({ a: 'property' }).info('hello child!') diff --git a/pino/pino.d.ts b/pino/pino.d.ts index 1d7049cf05..0a51c49275 100644 --- a/pino/pino.d.ts +++ b/pino/pino.d.ts @@ -41,8 +41,8 @@ declare module 'pino' { } interface Pino { - (optionsOrStream?: LoggerOptions | stream.Writable): Logger - (options: LoggerOptions, stream: stream.Writable): Logger + (optionsOrStream?: LoggerOptions | stream.Writable | stream.Readable): Logger + (options: LoggerOptions, stream: stream.Writable | stream.Readable): Logger levels: { values: LevelLabelsToValues labels: LevelValuesToLabels