@lokalise/node-core 9.15.0 → 9.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import type { BaseLogger, Bindings, ChildLoggerOptions } from 'pino';
|
|
2
2
|
export type CommonLogger = BaseLogger & {
|
|
3
|
+
/**
|
|
4
|
+
* Creates a child logger, setting all key-value pairs in `bindings` as properties in the log lines. All serializers will be applied to the given pair.
|
|
5
|
+
* Child loggers use the same output stream as the parent and inherit the current log level of the parent at the time they are spawned.
|
|
6
|
+
* If a `level` property is present in the object passed to `child` it will override the child logger level.
|
|
7
|
+
*
|
|
8
|
+
* @param bindings: an object of key-value pairs to include in log lines as properties.
|
|
9
|
+
* @param options: an options object that will override child logger inherited options.
|
|
10
|
+
* @returns a child logger instance.
|
|
11
|
+
*/
|
|
3
12
|
child(bindings: Bindings, options?: ChildLoggerOptions): CommonLogger;
|
|
13
|
+
/**
|
|
14
|
+
* A utility method for determining if a given log level will write to the destination.
|
|
15
|
+
*/
|
|
16
|
+
isLevelEnabled(level: string): boolean;
|
|
4
17
|
};
|