1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import nodeDebug from 'debug';
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | export interface LoggerConfig {
|
15 | |
16 |
|
17 |
|
18 |
|
19 |
|
20 | context?: string;
|
21 | }
|
22 | export declare class Logger {
|
23 | protected config: LoggerConfig;
|
24 | constructor({ context, ...rest }?: Partial<LoggerConfig>);
|
25 | /**
|
26 | * Logs a warning in the logger's context.
|
27 | *
|
28 | * @param message The message of the warning.
|
29 | */
|
30 | warn(message: string): void;
|
31 | /**
|
32 | * Uses node's util.inspect to stringify a value.
|
33 | *
|
34 | * @param value The value which should be inspected.
|
35 | * @returns The string of the inspected value.
|
36 | */
|
37 | inspect(value: unknown): string;
|
38 | /**
|
39 | * Gets a debugger for a context.
|
40 | *
|
41 | * @param name The name of the context.
|
42 | * @returns A debugger interace which can be used to debug.
|
43 | */
|
44 | debugContext(name: string): nodeDebug.Debugger;
|
45 | }
|
46 | export declare const logger: Logger;
|