1 | import { LoggingProvider } from '../types';
|
2 | import { Logger } from './logger-interface';
|
3 | export declare enum LOG_TYPE {
|
4 | DEBUG = "DEBUG",
|
5 | ERROR = "ERROR",
|
6 | INFO = "INFO",
|
7 | WARN = "WARN",
|
8 | VERBOSE = "VERBOSE"
|
9 | }
|
10 | /**
|
11 | * Write logs
|
12 | * @class Logger
|
13 | */
|
14 | export declare class ConsoleLogger implements Logger {
|
15 | name: string;
|
16 | level: LOG_TYPE | string;
|
17 | private _pluggables;
|
18 | private _config;
|
19 | /**
|
20 | * @constructor
|
21 | * @param {string} name - Name of the logger
|
22 | */
|
23 | constructor(name: string, level?: LOG_TYPE | string);
|
24 | static LOG_LEVEL: any;
|
25 | _padding(n: any): string;
|
26 | _ts(): string;
|
27 | configure(config?: object): object;
|
28 | /**
|
29 | * Write log
|
30 | * @method
|
31 | * @memeberof Logger
|
32 | * @param {LOG_TYPE|string} type - log type, default INFO
|
33 | * string|object} msg - Logging message or object
{ |
34 | */
|
35 | _log(type: LOG_TYPE | string, ...msg: any[]): void;
|
36 | /**
|
37 | * Write General log. Default to INFO
|
38 | * @method
|
39 | * @memeberof Logger
|
40 | * @param {string|object} msg - Logging message or object
|
41 | */
|
42 | log(...msg: any[]): void;
|
43 | /**
|
44 | * Write INFO log
|
45 | * @method
|
46 | * @memeberof Logger
|
47 | * @param {string|object} msg - Logging message or object
|
48 | */
|
49 | info(...msg: any[]): void;
|
50 | /**
|
51 | * Write WARN log
|
52 | * @method
|
53 | * @memeberof Logger
|
54 | * @param {string|object} msg - Logging message or object
|
55 | */
|
56 | warn(...msg: any[]): void;
|
57 | /**
|
58 | * Write ERROR log
|
59 | * @method
|
60 | * @memeberof Logger
|
61 | * @param {string|object} msg - Logging message or object
|
62 | */
|
63 | error(...msg: any[]): void;
|
64 | /**
|
65 | * Write DEBUG log
|
66 | * @method
|
67 | * @memeberof Logger
|
68 | * @param {string|object} msg - Logging message or object
|
69 | */
|
70 | debug(...msg: any[]): void;
|
71 | /**
|
72 | * Write VERBOSE log
|
73 | * @method
|
74 | * @memeberof Logger
|
75 | * @param {string|object} msg - Logging message or object
|
76 | */
|
77 | verbose(...msg: any[]): void;
|
78 | addPluggable(pluggable: LoggingProvider): void;
|
79 | listPluggables(): LoggingProvider[];
|
80 | }
|