pino-pretty
Advanced tools
Comparing version 10.0.1 to 10.1.0
@@ -192,2 +192,12 @@ // Type definitions for pino-pretty 7.0 | ||
customLevels?: string|object; | ||
/** | ||
* Change the level colors to an user custom preset. | ||
* | ||
* Can be a CSV string in 'level_name:color_value' format or an object. | ||
* Also supports 'default' as level_name for fallback color. | ||
* | ||
* @example ( CSV ) customColors: 'info:white,some_level:red' | ||
* @example ( Object ) customColors: { info: 'white', some_level: 'red' } | ||
*/ | ||
customColors?: string|object; | ||
} | ||
@@ -194,0 +204,0 @@ |
{ | ||
"name": "pino-pretty", | ||
"version": "10.0.1", | ||
"version": "10.1.0", | ||
"description": "Prettifier for Pino log lines", | ||
@@ -5,0 +5,0 @@ "type": "commonjs", |
@@ -37,2 +37,4 @@ import { expectType } from "tsd"; | ||
}, | ||
customLevels: 'verbose:5', | ||
customColors: 'default:white,verbose:gray', | ||
sync: false, | ||
@@ -44,29 +46,2 @@ destination: 2, | ||
const options2: PrettyOptions = { | ||
colorize: true, | ||
crlf: false, | ||
errorLikeObjectKeys: ["err", "error"], | ||
errorProps: "", | ||
hideObject: true, | ||
levelKey: "level", | ||
levelLabel: "foo", | ||
messageFormat: false, | ||
ignore: "", | ||
levelFirst: false, | ||
messageKey: "msg", | ||
timestampKey: "timestamp", | ||
minimumLevel: "trace", | ||
translateTime: "UTC:h:MM:ss TT Z", | ||
singleLine: false, | ||
customPrettifiers: { | ||
key: (value) => { | ||
return value.toString().toUpperCase(); | ||
} | ||
}, | ||
sync: false, | ||
destination: 2, | ||
append: true, | ||
mkdir: true, | ||
}; | ||
expectType<PrettyStream>(pretty()); // #326 | ||
@@ -81,3 +56,3 @@ expectType<PrettyStream>(pretty(options)); | ||
expectType<any>(PinoPrettyCjs(options)); | ||
expectType<PinoPretty.ColorizerFactory>(colorizerFactory) | ||
expectType<PinoPretty.PrettyFactory>(prettyFactory) | ||
expectType<PinoPretty.ColorizerFactory>(colorizerFactory); | ||
expectType<PinoPretty.PrettyFactory>(prettyFactory); |
188681
4176