node-ansi-logger 3.1.0 → 3.1.1
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.
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -0
- package/dist/logger.d.ts +419 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +447 -97
- package/dist/logger.js.map +1 -0
- package/dist/stringify.d.ts +76 -0
- package/dist/stringify.d.ts.map +1 -0
- package/dist/stringify.js +76 -0
- package/dist/stringify.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -1
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
|
package/dist/logger.d.ts
ADDED
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file contains the AnsiLogger .
|
|
3
|
+
*
|
|
4
|
+
* @file logger.ts
|
|
5
|
+
* @author Luca Liguori
|
|
6
|
+
* @created 2023-06-01
|
|
7
|
+
* @version 3.0.2
|
|
8
|
+
* @license Apache-2.0
|
|
9
|
+
*
|
|
10
|
+
* Copyright 2024, 2025, 2026 Luca Liguori.
|
|
11
|
+
*
|
|
12
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13
|
+
* you may not use this file except in compliance with the License.
|
|
14
|
+
* You may obtain a copy of the License at
|
|
15
|
+
*
|
|
16
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
*
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
19
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
20
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21
|
+
* See the License for the specific language governing permissions and
|
|
22
|
+
* limitations under the License.
|
|
23
|
+
*/
|
|
24
|
+
export declare const RESET = "\u001B[40;0m";
|
|
25
|
+
export declare const BRIGHT = "\u001B[1m";
|
|
26
|
+
export declare const DIM = "\u001B[2m";
|
|
27
|
+
export declare const NORMAL = "\u001B[22m";
|
|
28
|
+
export declare const UNDERLINE = "\u001B[4m";
|
|
29
|
+
export declare const UNDERLINEOFF = "\u001B[24m";
|
|
30
|
+
export declare const BLINK = "\u001B[5m";
|
|
31
|
+
export declare const BLINKOFF = "\u001B[25m";
|
|
32
|
+
export declare const REVERSE = "\u001B[7m";
|
|
33
|
+
export declare const REVERSEOFF = "\u001B[27m";
|
|
34
|
+
export declare const HIDDEN = "\u001B[8m";
|
|
35
|
+
export declare const HIDDENOFF = "\u001B[28m";
|
|
36
|
+
export declare const CURSORSAVE = "\u001B[s";
|
|
37
|
+
export declare const CURSORRESTORE = "\u001B[u";
|
|
38
|
+
export declare const BLACK = "\u001B[30m";
|
|
39
|
+
export declare const RED = "\u001B[31m";
|
|
40
|
+
export declare const GREEN = "\u001B[32m";
|
|
41
|
+
export declare const YELLOW = "\u001B[33m";
|
|
42
|
+
export declare const BLUE = "\u001B[34m";
|
|
43
|
+
export declare const MAGENTA = "\u001B[35m";
|
|
44
|
+
export declare const CYAN = "\u001B[36m";
|
|
45
|
+
export declare const LIGHT_GREY = "\u001B[37m";
|
|
46
|
+
export declare const GREY = "\u001B[90m";
|
|
47
|
+
export declare const WHITE = "\u001B[97m";
|
|
48
|
+
export declare const db = "\u001B[38;5;245m";
|
|
49
|
+
export declare const nf = "\u001B[38;5;252m";
|
|
50
|
+
export declare const nt = "\u001B[38;5;2m";
|
|
51
|
+
export declare const wr = "\u001B[38;5;220m";
|
|
52
|
+
export declare const er = "\u001B[38;5;1m";
|
|
53
|
+
export declare const ft = "\u001B[38;5;9m";
|
|
54
|
+
export declare const rs = "\u001B[40;0m";
|
|
55
|
+
export declare const rk = "\u001B[K";
|
|
56
|
+
export declare const dn = "\u001B[38;5;33m";
|
|
57
|
+
export declare const gn = "\u001B[38;5;35m";
|
|
58
|
+
export declare const idn = "\u001B[48;5;21m\u001B[38;5;255m";
|
|
59
|
+
export declare const ign = "\u001B[48;5;22m\u001B[38;5;255m";
|
|
60
|
+
export declare const zb = "\u001B[38;5;207m";
|
|
61
|
+
export declare const hk = "\u001B[38;5;79m";
|
|
62
|
+
export declare const pl = "\u001B[32m";
|
|
63
|
+
export declare const id = "\u001B[37;44m";
|
|
64
|
+
export declare const or = "\u001B[38;5;208m";
|
|
65
|
+
/**
|
|
66
|
+
* LogLevel enumeration to specify the logging level.
|
|
67
|
+
*/
|
|
68
|
+
export declare const enum LogLevel {
|
|
69
|
+
NONE = "",
|
|
70
|
+
DEBUG = "debug",
|
|
71
|
+
INFO = "info",
|
|
72
|
+
NOTICE = "notice",
|
|
73
|
+
WARN = "warn",
|
|
74
|
+
ERROR = "error",
|
|
75
|
+
FATAL = "fatal"
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Logger interface for custom loggers that can be passed to AnsiLogger for output instead of console output.
|
|
79
|
+
*/
|
|
80
|
+
export interface Logger {
|
|
81
|
+
debug: (...data: any[]) => void;
|
|
82
|
+
info: (...data: any[]) => void;
|
|
83
|
+
notice: (...data: any[]) => void;
|
|
84
|
+
warn: (...data: any[]) => void;
|
|
85
|
+
error: (...data: any[]) => void;
|
|
86
|
+
fatal: (...data: any[]) => void;
|
|
87
|
+
log: (level: LogLevel, message: string, ...parameters: any[]) => void;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* TimestampFormat enumeration to specify the format of timestamps in log messages.
|
|
91
|
+
*/
|
|
92
|
+
export declare const enum TimestampFormat {
|
|
93
|
+
ISO = 0,
|
|
94
|
+
LOCAL_DATE = 1,
|
|
95
|
+
LOCAL_TIME = 2,
|
|
96
|
+
LOCAL_DATE_TIME = 3,
|
|
97
|
+
TIME_MILLIS = 4,
|
|
98
|
+
HOMEBRIDGE = 5,
|
|
99
|
+
CUSTOM = 6
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Parameters for configuring an AnsiLogger instance.
|
|
103
|
+
*/
|
|
104
|
+
export interface AnsiLoggerParams {
|
|
105
|
+
extLog?: Logger;
|
|
106
|
+
logName?: string;
|
|
107
|
+
logDebug?: boolean;
|
|
108
|
+
logLevel?: LogLevel;
|
|
109
|
+
logWithColors?: boolean;
|
|
110
|
+
logTimestampFormat?: TimestampFormat;
|
|
111
|
+
logCustomTimestampFormat?: string;
|
|
112
|
+
}
|
|
113
|
+
export type AnsiLoggerCallback = (level: string, time: string, name: string, message: string) => void;
|
|
114
|
+
/**
|
|
115
|
+
* AnsiLogger provides a customizable logging utility with ANSI color support.
|
|
116
|
+
* It allows for various configurations such as enabling debug logs, customizing log name, and more.
|
|
117
|
+
*/
|
|
118
|
+
export declare class AnsiLogger {
|
|
119
|
+
private _extLog;
|
|
120
|
+
private _logName;
|
|
121
|
+
private _logFilePath;
|
|
122
|
+
private _logFileSize;
|
|
123
|
+
private _logLevel;
|
|
124
|
+
private _logWithColors;
|
|
125
|
+
private _logTimestampFormat;
|
|
126
|
+
private _logCustomTimestampFormat;
|
|
127
|
+
private _logTimeStampColor;
|
|
128
|
+
private _logNameColor;
|
|
129
|
+
private _maxFileSize;
|
|
130
|
+
private logStartTime;
|
|
131
|
+
private callback;
|
|
132
|
+
/**
|
|
133
|
+
* Constructs a new AnsiLogger instance with optional configuration parameters.
|
|
134
|
+
*
|
|
135
|
+
* @param {AnsiLoggerParams} params - Configuration options for the logger.
|
|
136
|
+
*/
|
|
137
|
+
constructor(params: AnsiLoggerParams);
|
|
138
|
+
/**
|
|
139
|
+
* Gets the name of the logger.
|
|
140
|
+
*
|
|
141
|
+
* @returns {string} The logger name.
|
|
142
|
+
*/
|
|
143
|
+
get logName(): string;
|
|
144
|
+
/**
|
|
145
|
+
* Sets the log name for the logger.
|
|
146
|
+
*
|
|
147
|
+
* @param {string} name - The logger name to set.
|
|
148
|
+
*/
|
|
149
|
+
set logName(name: string);
|
|
150
|
+
/**
|
|
151
|
+
* Gets the log level of the logger.
|
|
152
|
+
*
|
|
153
|
+
* @returns {LogLevel} The log level.
|
|
154
|
+
*/
|
|
155
|
+
get logLevel(): LogLevel;
|
|
156
|
+
/**
|
|
157
|
+
* Sets the log level for the logger.
|
|
158
|
+
*
|
|
159
|
+
* @param {LogLevel} logLevel - The log level to set.
|
|
160
|
+
*/
|
|
161
|
+
set logLevel(logLevel: LogLevel);
|
|
162
|
+
/**
|
|
163
|
+
* Gets the logWithColors flag of the logger.
|
|
164
|
+
*
|
|
165
|
+
* @returns {boolean} The logWithColors parameter.
|
|
166
|
+
*/
|
|
167
|
+
get logWithColors(): boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Sets the logWithColors flag of the logger.
|
|
170
|
+
*
|
|
171
|
+
* @param {boolean} logWithColors - The logWithColors parameter to set.
|
|
172
|
+
*/
|
|
173
|
+
set logWithColors(logWithColors: boolean);
|
|
174
|
+
/**
|
|
175
|
+
* Gets the log name color string of the logger.
|
|
176
|
+
*
|
|
177
|
+
* @returns {string} The log name color string.
|
|
178
|
+
*/
|
|
179
|
+
get logNameColor(): string;
|
|
180
|
+
/**
|
|
181
|
+
* Sets the log name color string for the logger.
|
|
182
|
+
*
|
|
183
|
+
* @param {string} color - The logger name color string to set.
|
|
184
|
+
*/
|
|
185
|
+
set logNameColor(color: string);
|
|
186
|
+
/**
|
|
187
|
+
* Gets the log timestamp format of the logger.
|
|
188
|
+
*
|
|
189
|
+
* @returns {TimestampFormat} The log timestamp format.
|
|
190
|
+
*/
|
|
191
|
+
get logTimestampFormat(): TimestampFormat;
|
|
192
|
+
/**
|
|
193
|
+
* Sets the log timestamp format for the logger.
|
|
194
|
+
*
|
|
195
|
+
* @param {TimestampFormat} logTimestampFormat - The log timestamp format to set.
|
|
196
|
+
*/
|
|
197
|
+
set logTimestampFormat(logTimestampFormat: TimestampFormat);
|
|
198
|
+
/**
|
|
199
|
+
* Gets the custom log timestamp format of the logger.
|
|
200
|
+
*
|
|
201
|
+
* @returns {string} The custom log timestamp format.
|
|
202
|
+
*/
|
|
203
|
+
get logCustomTimestampFormat(): string;
|
|
204
|
+
/**
|
|
205
|
+
* Sets the custom log timestamp format for the logger.
|
|
206
|
+
*
|
|
207
|
+
* @param {string} logCustomTimestampFormat - The custom log timestamp format to set.
|
|
208
|
+
*/
|
|
209
|
+
set logCustomTimestampFormat(logCustomTimestampFormat: string);
|
|
210
|
+
/**
|
|
211
|
+
* Gets the file path of the log.
|
|
212
|
+
*
|
|
213
|
+
* @returns {string | undefined} The file path of the log, or undefined if not set.
|
|
214
|
+
*/
|
|
215
|
+
get logFilePath(): string | undefined;
|
|
216
|
+
/**
|
|
217
|
+
* Sets the file path for logging.
|
|
218
|
+
*
|
|
219
|
+
* @param {string | undefined} filePath - The file path to set for logging.
|
|
220
|
+
*/
|
|
221
|
+
set logFilePath(filePath: string | undefined);
|
|
222
|
+
/**
|
|
223
|
+
* Gets the size of log file.
|
|
224
|
+
*
|
|
225
|
+
* @returns {number | undefined} The size of log file, or undefined if not set.
|
|
226
|
+
*/
|
|
227
|
+
get logFileSize(): number | undefined;
|
|
228
|
+
/**
|
|
229
|
+
* Gets the max file size of the file loggers.
|
|
230
|
+
*
|
|
231
|
+
* @returns {number} The current maxFileSize.
|
|
232
|
+
*/
|
|
233
|
+
get maxFileSize(): number;
|
|
234
|
+
/**
|
|
235
|
+
* Sets the max file size of the file loggers.
|
|
236
|
+
*
|
|
237
|
+
* @param {number} maxFileSize - The maxFileSize to set.
|
|
238
|
+
*/
|
|
239
|
+
set maxFileSize(maxFileSize: number);
|
|
240
|
+
/**
|
|
241
|
+
* Starts a timer with an optional message.
|
|
242
|
+
*
|
|
243
|
+
* @param {string} message - The message to log when starting the timer.
|
|
244
|
+
*/
|
|
245
|
+
startTimer(message: string): void;
|
|
246
|
+
/**
|
|
247
|
+
* Stops the timer started by startTimer and logs the elapsed time.
|
|
248
|
+
*
|
|
249
|
+
* @param {string} message - The message to log along with the elapsed time.
|
|
250
|
+
*/
|
|
251
|
+
stopTimer(message: string): void;
|
|
252
|
+
/**
|
|
253
|
+
* Sets the callback function to be used by the logger.
|
|
254
|
+
*
|
|
255
|
+
* @param {AnsiLoggerCallback} callback - The callback function.
|
|
256
|
+
*/
|
|
257
|
+
setCallback(callback: AnsiLoggerCallback | undefined): void;
|
|
258
|
+
/**
|
|
259
|
+
* Gets the callback function currently used by the logger.
|
|
260
|
+
*
|
|
261
|
+
* @returns {AnsiLoggerCallback | undefined} The callback function.
|
|
262
|
+
*/
|
|
263
|
+
getCallback(): AnsiLoggerCallback | undefined;
|
|
264
|
+
/**
|
|
265
|
+
* Sets the global callback function to be used by the logger.
|
|
266
|
+
*
|
|
267
|
+
* @param {AnsiLoggerCallback | undefined} callback - The callback function.
|
|
268
|
+
* @param {LogLevel} [callbackLevel] - The log level of the log file (default LogLevel.DEBUG).
|
|
269
|
+
*
|
|
270
|
+
* @returns {AnsiLoggerCallback | undefined} The path name of the log file.
|
|
271
|
+
*/
|
|
272
|
+
static setGlobalCallback(callback: AnsiLoggerCallback | undefined, callbackLevel?: LogLevel): AnsiLoggerCallback | undefined;
|
|
273
|
+
/**
|
|
274
|
+
* Gets the global callback function currently used by the logger.
|
|
275
|
+
*
|
|
276
|
+
* @returns {AnsiLoggerCallback | undefined} The callback function.
|
|
277
|
+
*/
|
|
278
|
+
static getGlobalCallback(): AnsiLoggerCallback | undefined;
|
|
279
|
+
/**
|
|
280
|
+
* Gets the global callback log level used by the logger.
|
|
281
|
+
*
|
|
282
|
+
* @returns {LogLevel | undefined} The log level of the global callback.
|
|
283
|
+
*/
|
|
284
|
+
static getGlobalCallbackLevel(): LogLevel | undefined;
|
|
285
|
+
/**
|
|
286
|
+
* Sets the global callback log level for the logger.
|
|
287
|
+
*
|
|
288
|
+
* @param {LogLevel} logLevel - The log level to set. Defaults to LogLevel.DEBUG.
|
|
289
|
+
*
|
|
290
|
+
* @returns {LogLevel | undefined} The log level that was set.
|
|
291
|
+
*/
|
|
292
|
+
static setGlobalCallbackLevel(logLevel?: LogLevel): LogLevel | undefined;
|
|
293
|
+
/**
|
|
294
|
+
* Sets the global logfile to be used by the logger.
|
|
295
|
+
*
|
|
296
|
+
* @param {string} logfilePath - The path name of the log file.
|
|
297
|
+
* @param {LogLevel} logfileLevel - Optional: the log level of the log file. Default LogLevel.DEBUG.
|
|
298
|
+
* @param {boolean} unlink - Optional: whether to unlink (delete) the log file if it exists. Default false.
|
|
299
|
+
*
|
|
300
|
+
* @returns {string | undefined} The absolute path name of the log file.
|
|
301
|
+
*/
|
|
302
|
+
static setGlobalLogfile(logfilePath: string | undefined, logfileLevel?: LogLevel, unlink?: boolean): string | undefined;
|
|
303
|
+
/**
|
|
304
|
+
* Gets the global logfile currently used by the logger.
|
|
305
|
+
*
|
|
306
|
+
* @returns {string | undefined} The path name of the log file.
|
|
307
|
+
*/
|
|
308
|
+
static getGlobalLogfile(): string | undefined;
|
|
309
|
+
/**
|
|
310
|
+
* Gets the global logfile log level used by the loggers.
|
|
311
|
+
*
|
|
312
|
+
* @returns {LogLevel | undefined} The log level of the global logfile.
|
|
313
|
+
*/
|
|
314
|
+
static getGlobalLogfileLevel(): LogLevel | undefined;
|
|
315
|
+
/**
|
|
316
|
+
* Sets the global logfile log level used by the loggers.
|
|
317
|
+
*
|
|
318
|
+
* @param {LogLevel} logfileLevel - The global logfile log level used by the loggers.
|
|
319
|
+
*
|
|
320
|
+
* @returns {LogLevel | undefined} The log level of the global logfile.
|
|
321
|
+
*/
|
|
322
|
+
static setGlobalLogfileLevel(logfileLevel: LogLevel): LogLevel | undefined;
|
|
323
|
+
/**
|
|
324
|
+
* Determines whether a log message with the given level should be logged based on the configured log level.
|
|
325
|
+
*
|
|
326
|
+
* @param {LogLevel} level - The level of the log message.
|
|
327
|
+
* @param {LogLevel | undefined} configuredLevel - The configured log level.
|
|
328
|
+
*
|
|
329
|
+
* @returns {boolean} A boolean indicating whether the log message should be logged.
|
|
330
|
+
*/
|
|
331
|
+
private shouldLog;
|
|
332
|
+
/**
|
|
333
|
+
* Formats a Date object into a custom string format.
|
|
334
|
+
*
|
|
335
|
+
* @param {Date} date - The Date object to format.
|
|
336
|
+
* @param {string} formatString - The string format to use.
|
|
337
|
+
* @returns {string} The formatted date.
|
|
338
|
+
* It only handles years, months, days, hours, minutes, and seconds
|
|
339
|
+
* with this format 'yyyy-MM-dd HH:mm:ss'
|
|
340
|
+
*/
|
|
341
|
+
private formatCustomTimestamp;
|
|
342
|
+
/**
|
|
343
|
+
* Returns the current timestamp as a string.
|
|
344
|
+
*
|
|
345
|
+
* @returns {string} The current timestamp.
|
|
346
|
+
*/
|
|
347
|
+
now(): string;
|
|
348
|
+
/**
|
|
349
|
+
* Returns the timestamp based on the configured format.
|
|
350
|
+
* If the log start time is set, it returns the time passed since the start time.
|
|
351
|
+
* Otherwise, it returns the current timestamp based on the configured format.
|
|
352
|
+
*
|
|
353
|
+
* @returns {string} The timestamp string.
|
|
354
|
+
*/
|
|
355
|
+
private getTimestamp;
|
|
356
|
+
/**
|
|
357
|
+
* Writes a log message to a file.
|
|
358
|
+
*
|
|
359
|
+
* @param {string} filePath - The path of the file to write the log message to.
|
|
360
|
+
* @param {LogLevel} level - The log level of the message.
|
|
361
|
+
* @param {string} message - The log message.
|
|
362
|
+
* @param {...any[]} parameters - Additional parameters to include in the log message.
|
|
363
|
+
* @returns {number} - The length of the log message including the appended newline character.
|
|
364
|
+
*/
|
|
365
|
+
private logToFile;
|
|
366
|
+
/**
|
|
367
|
+
* Logs a message with a specific level (e.g. debug, info, notice, warn, error, fatal) and additional parameters.
|
|
368
|
+
* This method formats the log message with ANSI colors based on the log level and other logger settings.
|
|
369
|
+
* It supports dynamic parameters for more detailed and formatted logging.
|
|
370
|
+
*
|
|
371
|
+
* @param {LogLevel} level - The severity level of the log message.
|
|
372
|
+
* @param {string} message - The primary log message to be displayed.
|
|
373
|
+
* @param {...any[]} parameters - Additional parameters to be logged. Supports any number of parameters.
|
|
374
|
+
*/
|
|
375
|
+
log(level: LogLevel, message: string, ...parameters: any[]): void;
|
|
376
|
+
/**
|
|
377
|
+
* Logs a debug message if debug logging is enabled. This is a convenience method that delegates to the `log` method with the `LogLevel.DEBUG` level.
|
|
378
|
+
*
|
|
379
|
+
* @param {string} message - The message to log.
|
|
380
|
+
* @param {...any[]} parameters - Additional parameters to be included in the log message. Supports any number of parameters.
|
|
381
|
+
*/
|
|
382
|
+
debug(message: string, ...parameters: any[]): void;
|
|
383
|
+
/**
|
|
384
|
+
* Logs an informational message. This is a convenience method that delegates to the `log` method with the `LogLevel.INFO` level.
|
|
385
|
+
*
|
|
386
|
+
* @param {string} message - The message to log.
|
|
387
|
+
* @param {...any[]} parameters - Additional parameters to be included in the log message. Supports any number of parameters.
|
|
388
|
+
*/
|
|
389
|
+
info(message: string, ...parameters: any[]): void;
|
|
390
|
+
/**
|
|
391
|
+
* Logs a notice message. This is a convenience method that delegates to the `log` method with the `LogLevel.NOTICE` level.
|
|
392
|
+
*
|
|
393
|
+
* @param {string} message - The message to log.
|
|
394
|
+
* @param {...any[]} parameters - Additional parameters to be included in the log message. Supports any number of parameters.
|
|
395
|
+
*/
|
|
396
|
+
notice(message: string, ...parameters: any[]): void;
|
|
397
|
+
/**
|
|
398
|
+
* Logs a warning message. This is a convenience method that delegates to the `log` method with the `LogLevel.WARN` level.
|
|
399
|
+
*
|
|
400
|
+
* @param {string} message - The message to log.
|
|
401
|
+
* @param {...any[]} parameters - Additional parameters to be included in the log message. Supports any number of parameters.
|
|
402
|
+
*/
|
|
403
|
+
warn(message: string, ...parameters: any[]): void;
|
|
404
|
+
/**
|
|
405
|
+
* Logs an error message. This is a convenience method that delegates to the `log` method with the `LogLevel.ERROR` level.
|
|
406
|
+
*
|
|
407
|
+
* @param {string} message - The message to log.
|
|
408
|
+
* @param {...any[]} parameters - Additional parameters to be included in the log message. Supports any number of parameters.
|
|
409
|
+
*/
|
|
410
|
+
error(message: string, ...parameters: any[]): void;
|
|
411
|
+
/**
|
|
412
|
+
* Logs a fatal message. This is a convenience method that delegates to the `log` method with the `LogLevel.FATAL` level.
|
|
413
|
+
*
|
|
414
|
+
* @param {string} message - The message to log.
|
|
415
|
+
* @param {...any[]} parameters - Additional parameters to be included in the log message. Supports any number of parameters.
|
|
416
|
+
*/
|
|
417
|
+
fatal(message: string, ...parameters: any[]): void;
|
|
418
|
+
}
|
|
419
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAYH,eAAO,MAAM,KAAK,iBAAY,CAAC;AAC/B,eAAO,MAAM,MAAM,cAAS,CAAC;AAC7B,eAAO,MAAM,GAAG,cAAS,CAAC;AAC1B,eAAO,MAAM,MAAM,eAAU,CAAC;AAC9B,eAAO,MAAM,SAAS,cAAS,CAAC;AAChC,eAAO,MAAM,YAAY,eAAU,CAAC;AACpC,eAAO,MAAM,KAAK,cAAS,CAAC;AAC5B,eAAO,MAAM,QAAQ,eAAU,CAAC;AAChC,eAAO,MAAM,OAAO,cAAS,CAAC;AAC9B,eAAO,MAAM,UAAU,eAAU,CAAC;AAClC,eAAO,MAAM,MAAM,cAAS,CAAC;AAC7B,eAAO,MAAM,SAAS,eAAU,CAAC;AACjC,eAAO,MAAM,UAAU,aAAQ,CAAC;AAChC,eAAO,MAAM,aAAa,aAAQ,CAAC;AAEnC,eAAO,MAAM,KAAK,eAAU,CAAC;AAC7B,eAAO,MAAM,GAAG,eAAU,CAAC;AAC3B,eAAO,MAAM,KAAK,eAAU,CAAC;AAC7B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