@wgtechlabs/log-engine 2.2.2 → 2.3.0-dev.8fdf09c
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/README.md +234 -37
- package/dist/cjs/formatter/emoji-data.cjs +87 -0
- package/dist/cjs/formatter/emoji-data.d.ts +18 -0
- package/dist/cjs/formatter/emoji-data.d.ts.map +1 -0
- package/dist/cjs/formatter/emoji-data.js.map +1 -0
- package/dist/cjs/formatter/emoji-selector.cjs +209 -0
- package/dist/cjs/formatter/emoji-selector.d.ts +74 -0
- package/dist/cjs/formatter/emoji-selector.d.ts.map +1 -0
- package/dist/cjs/formatter/emoji-selector.js.map +1 -0
- package/dist/cjs/formatter/index.cjs +6 -1
- package/dist/cjs/formatter/index.d.ts +2 -0
- package/dist/cjs/formatter/index.d.ts.map +1 -1
- package/dist/cjs/formatter/index.js.map +1 -1
- package/dist/cjs/formatter/message-formatter.cjs +24 -3
- package/dist/cjs/formatter/message-formatter.d.ts +3 -2
- package/dist/cjs/formatter/message-formatter.d.ts.map +1 -1
- package/dist/cjs/formatter/message-formatter.js.map +1 -1
- package/dist/cjs/index.cjs +36 -16
- package/dist/cjs/index.d.ts +29 -12
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/logger/core.cjs +43 -22
- package/dist/cjs/logger/core.d.ts +22 -11
- package/dist/cjs/logger/core.d.ts.map +1 -1
- package/dist/cjs/logger/core.js.map +1 -1
- package/dist/cjs/types/index.d.ts +59 -15
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/esm/formatter/emoji-data.d.ts +18 -0
- package/dist/esm/formatter/emoji-data.d.ts.map +1 -0
- package/dist/esm/formatter/emoji-data.js +84 -0
- package/dist/esm/formatter/emoji-data.js.map +1 -0
- package/dist/esm/formatter/emoji-selector.d.ts +74 -0
- package/dist/esm/formatter/emoji-selector.d.ts.map +1 -0
- package/dist/esm/formatter/emoji-selector.js +205 -0
- package/dist/esm/formatter/emoji-selector.js.map +1 -0
- package/dist/esm/formatter/index.d.ts +2 -0
- package/dist/esm/formatter/index.d.ts.map +1 -1
- package/dist/esm/formatter/index.js +2 -0
- package/dist/esm/formatter/index.js.map +1 -1
- package/dist/esm/formatter/message-formatter.d.ts +3 -2
- package/dist/esm/formatter/message-formatter.d.ts.map +1 -1
- package/dist/esm/formatter/message-formatter.js +24 -3
- package/dist/esm/formatter/message-formatter.js.map +1 -1
- package/dist/esm/index.d.ts +29 -12
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +32 -15
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/logger/core.d.ts +22 -11
- package/dist/esm/logger/core.d.ts.map +1 -1
- package/dist/esm/logger/core.js +44 -23
- package/dist/esm/logger/core.js.map +1 -1
- package/dist/esm/types/index.d.ts +59 -15
- package/dist/esm/types/index.d.ts.map +1 -1
- package/dist/esm/types/index.js.map +1 -1
- package/package.json +3 -2
package/dist/cjs/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* // Output: [2025-06-18T...][3:45PM][INFO]: User login { username: 'john', password: '[REDACTED]' }
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
|
-
import type { LoggerConfig, RedactionConfig, ILogEngineWithoutRedaction, LogData } from './types';
|
|
22
|
+
import type { LoggerConfig, RedactionConfig, ILogEngineWithoutRedaction, LogData, LogCallOptions } from './types';
|
|
23
23
|
/**
|
|
24
24
|
* LogEngine - The main interface for logging operations
|
|
25
25
|
* Provides a simple, intuitive API for all logging needs with security-first design
|
|
@@ -39,91 +39,106 @@ export declare const LogEngine: {
|
|
|
39
39
|
* Only shown in DEVELOPMENT mode
|
|
40
40
|
* @param message - The debug message to log
|
|
41
41
|
* @param data - Optional data object to log (sensitive data will be redacted)
|
|
42
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
42
43
|
* @example
|
|
43
44
|
* ```typescript
|
|
44
45
|
* LogEngine.debug('Processing user data', { userId: 123, email: 'user@example.com' });
|
|
46
|
+
* LogEngine.debug('Starting process', undefined, { emoji: '🔍' });
|
|
45
47
|
* ```
|
|
46
48
|
*/
|
|
47
|
-
debug: (message: string, data?: LogData) => void;
|
|
49
|
+
debug: (message: string, data?: LogData, options?: LogCallOptions) => void;
|
|
48
50
|
/**
|
|
49
51
|
* Log an info message with automatic data redaction
|
|
50
52
|
* Shown in DEVELOPMENT and PRODUCTION modes
|
|
51
53
|
* @param message - The info message to log
|
|
52
54
|
* @param data - Optional data object to log (sensitive data will be redacted)
|
|
55
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
53
56
|
* @example
|
|
54
57
|
* ```typescript
|
|
55
58
|
* LogEngine.info('User login successful', { username: 'john' });
|
|
59
|
+
* LogEngine.info('Database initialized', undefined, { emoji: '✅' });
|
|
56
60
|
* ```
|
|
57
61
|
*/
|
|
58
|
-
info: (message: string, data?: LogData) => void;
|
|
62
|
+
info: (message: string, data?: LogData, options?: LogCallOptions) => void;
|
|
59
63
|
/**
|
|
60
64
|
* Log a warning message with automatic data redaction
|
|
61
65
|
* Shown in DEVELOPMENT and PRODUCTION modes
|
|
62
66
|
* @param message - The warning message to log
|
|
63
67
|
* @param data - Optional data object to log (sensitive data will be redacted)
|
|
68
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
64
69
|
* @example
|
|
65
70
|
* ```typescript
|
|
66
71
|
* LogEngine.warn('API rate limit approaching', { requestsRemaining: 10 });
|
|
72
|
+
* LogEngine.warn('Low disk space', undefined, { emoji: '💾' });
|
|
67
73
|
* ```
|
|
68
74
|
*/
|
|
69
|
-
warn: (message: string, data?: LogData) => void;
|
|
75
|
+
warn: (message: string, data?: LogData, options?: LogCallOptions) => void;
|
|
70
76
|
/**
|
|
71
77
|
* Log an error message with automatic data redaction
|
|
72
78
|
* Shown in DEVELOPMENT and PRODUCTION modes
|
|
73
79
|
* @param message - The error message to log
|
|
74
80
|
* @param data - Optional data object to log (sensitive data will be redacted)
|
|
81
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
75
82
|
* @example
|
|
76
83
|
* ```typescript
|
|
77
84
|
* LogEngine.error('Database connection failed', { host: 'localhost', port: 5432 });
|
|
85
|
+
* LogEngine.error('Critical failure', undefined, { emoji: '💥' });
|
|
78
86
|
* ```
|
|
79
87
|
*/
|
|
80
|
-
error: (message: string, data?: LogData) => void;
|
|
88
|
+
error: (message: string, data?: LogData, options?: LogCallOptions) => void;
|
|
81
89
|
/**
|
|
82
90
|
* Log a critical message with automatic data redaction
|
|
83
91
|
* Always shown regardless of mode (except OFF)
|
|
84
92
|
* @param message - The critical log message to log
|
|
85
93
|
* @param data - Optional data object to log (sensitive data will be redacted)
|
|
94
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
86
95
|
* @example
|
|
87
96
|
* ```typescript
|
|
88
97
|
* LogEngine.log('Application starting', { version: '1.0.0' });
|
|
98
|
+
* LogEngine.log('System ready', undefined, { emoji: '🚀' });
|
|
89
99
|
* ```
|
|
90
100
|
*/
|
|
91
|
-
log: (message: string, data?: LogData) => void;
|
|
101
|
+
log: (message: string, data?: LogData, options?: LogCallOptions) => void;
|
|
92
102
|
/**
|
|
93
103
|
* Log a debug message without redaction (use with caution)
|
|
94
104
|
* Bypasses automatic data redaction for debugging purposes
|
|
95
105
|
* @param message - The debug message to log
|
|
96
106
|
* @param data - Optional data object to log (no redaction applied)
|
|
107
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
97
108
|
*/
|
|
98
|
-
debugRaw: (message: string, data?: LogData) => void;
|
|
109
|
+
debugRaw: (message: string, data?: LogData, options?: LogCallOptions) => void;
|
|
99
110
|
/**
|
|
100
111
|
* Log an info message without redaction (use with caution)
|
|
101
112
|
* Bypasses automatic data redaction for debugging purposes
|
|
102
113
|
* @param message - The info message to log
|
|
103
114
|
* @param data - Optional data object to log (no redaction applied)
|
|
115
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
104
116
|
*/
|
|
105
|
-
infoRaw: (message: string, data?: LogData) => void;
|
|
117
|
+
infoRaw: (message: string, data?: LogData, options?: LogCallOptions) => void;
|
|
106
118
|
/**
|
|
107
119
|
* Log a warning message without redaction (use with caution)
|
|
108
120
|
* Bypasses automatic data redaction for debugging purposes
|
|
109
121
|
* @param message - The warning message to log
|
|
110
122
|
* @param data - Optional data object to log (no redaction applied)
|
|
123
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
111
124
|
*/
|
|
112
|
-
warnRaw: (message: string, data?: LogData) => void;
|
|
125
|
+
warnRaw: (message: string, data?: LogData, options?: LogCallOptions) => void;
|
|
113
126
|
/**
|
|
114
127
|
* Log an error message without redaction (use with caution)
|
|
115
128
|
* Bypasses automatic data redaction for debugging purposes
|
|
116
129
|
* @param message - The error message to log
|
|
117
130
|
* @param data - Optional data object to log (no redaction applied)
|
|
131
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
118
132
|
*/
|
|
119
|
-
errorRaw: (message: string, data?: LogData) => void;
|
|
133
|
+
errorRaw: (message: string, data?: LogData, options?: LogCallOptions) => void;
|
|
120
134
|
/**
|
|
121
135
|
* Log a critical message without redaction (use with caution)
|
|
122
136
|
* Bypasses automatic data redaction for debugging purposes
|
|
123
137
|
* @param message - The critical log message to log
|
|
124
138
|
* @param data - Optional data object to log (no redaction applied)
|
|
139
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
125
140
|
*/
|
|
126
|
-
logRaw: (message: string, data?: LogData) => void;
|
|
141
|
+
logRaw: (message: string, data?: LogData, options?: LogCallOptions) => void;
|
|
127
142
|
/**
|
|
128
143
|
* Configure data redaction settings
|
|
129
144
|
* @param config - Partial redaction configuration to apply
|
|
@@ -169,12 +184,14 @@ export declare const LogEngine: {
|
|
|
169
184
|
* @example
|
|
170
185
|
* ```typescript
|
|
171
186
|
* LogEngine.withoutRedaction().info('Debug data', sensitiveObject);
|
|
187
|
+
* LogEngine.withoutRedaction().info('Custom emoji', undefined, { emoji: '🔍' });
|
|
172
188
|
* ```
|
|
173
189
|
*/
|
|
174
190
|
withoutRedaction: () => ILogEngineWithoutRedaction;
|
|
175
191
|
};
|
|
176
192
|
export { LogMode, LogLevel } from './types';
|
|
177
|
-
export type { LoggerConfig, LogFormatConfig, RedactionConfig, LogOutputHandler, BuiltInOutputHandler, OutputTarget, FileOutputConfig, HttpOutputConfig, AdvancedOutputConfig, EnhancedOutputTarget } from './types';
|
|
193
|
+
export type { LoggerConfig, LogFormatConfig, RedactionConfig, LogOutputHandler, BuiltInOutputHandler, OutputTarget, LogCallOptions, FileOutputConfig, HttpOutputConfig, AdvancedOutputConfig, EnhancedOutputTarget, EmojiConfig, EmojiMapping } from './types';
|
|
178
194
|
export { DataRedactor, defaultRedactionConfig, RedactionController } from './redaction';
|
|
195
|
+
export { EmojiSelector, EMOJI_MAPPINGS, FALLBACK_EMOJI } from './formatter';
|
|
179
196
|
export default LogEngine;
|
|
180
197
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,0BAA0B,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,0BAA0B,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAMlH;;;GAGG;AACH,eAAO,MAAM,SAAS;IACpB;;;;;;;SAOK;wBACe,OAAO,CAAC,YAAY,CAAC,KAAG,IAAI;IAGhD;;;;;;;;;;;SAWK;qBACY,MAAM,SAA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BAAoB,EAEpB,WAAW,EACX,YAAY,EACb,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG5E,eAAe,SAAS,CAAC"}
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AAEH,qCAAkC;AAElC,2CAAmE;AAEnE,qCAAqC;AACrC,MAAM,MAAM,GAAG,IAAI,eAAM,EAAE,CAAC;AAE5B;;;GAGG;AACU,QAAA,SAAS,GAAG;IACvB;;;;;;;SAOK;IACL,SAAS,EAAE,CAAC,MAA6B,EAAQ,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;IAE5E,oDAAoD;IACpD
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AAEH,qCAAkC;AAElC,2CAAmE;AAEnE,qCAAqC;AACrC,MAAM,MAAM,GAAG,IAAI,eAAM,EAAE,CAAC;AAE5B;;;GAGG;AACU,QAAA,SAAS,GAAG;IACvB;;;;;;;SAOK;IACL,SAAS,EAAE,CAAC,MAA6B,EAAQ,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;IAE5E,oDAAoD;IACpD;;;;;;;;;;;SAWK;IACL,KAAK,EAAE,CAAC,OAAe,EAAE,IAAc,EAAE,OAAwB,EAAQ,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC;IAEhH;;;;;;;;;;;SAWK;IACL,IAAI,EAAE,CAAC,OAAe,EAAE,IAAc,EAAE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AC;QACjH,IAAI,EAAE,CAAC,OAAe,EAAE,IAAc,EAAE,OAAwB,EAAQ,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC;QACjH,KAAK,EAAE,CAAC,OAAe,EAAE,IAAc,EAAE,OAAwB,EAAQ,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC;QACnH,GAAG,EAAE,CAAC,OAAe,EAAE,IAAc,EAAE,OAAwB,EAAQ,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC;KAChH,CAAC;CACH,CAAC;AAEF,iDAAiD;AACjD,iCAA4C;AAAnC,gGAAA,OAAO,OAAA;AAAE,iGAAA,QAAQ,OAAA;AAkB1B,yCAAwF;AAA/E,yGAAA,YAAY,OAAA;AAAE,mHAAA,sBAAsB,OAAA;AAAE,gHAAA,mBAAmB,OAAA;AAClE,yCAA4E;AAAnE,0GAAA,aAAa,OAAA;AAAE,2GAAA,cAAc,OAAA;AAAE,2GAAA,cAAc,OAAA;AAEtD,iCAAiC;AACjC,kBAAe,iBAAS,CAAC"}
|
package/dist/cjs/logger/core.cjs
CHANGED
|
@@ -48,11 +48,12 @@ class Logger {
|
|
|
48
48
|
* @param level - The log level to format for
|
|
49
49
|
* @param message - The message content to format
|
|
50
50
|
* @param data - Optional data object to include in the log output
|
|
51
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
51
52
|
* @returns Formatted string with appropriate configuration applied
|
|
52
53
|
*/
|
|
53
|
-
formatMessage(level, message, data) {
|
|
54
|
+
formatMessage(level, message, data, options) {
|
|
54
55
|
const cachedConfig = this.getCachedConfig();
|
|
55
|
-
return formatter_1.LogFormatter.format(level, message, data, cachedConfig.format);
|
|
56
|
+
return formatter_1.LogFormatter.format(level, message, data, cachedConfig.format, options);
|
|
56
57
|
}
|
|
57
58
|
/**
|
|
58
59
|
* Built-in output handlers for common use cases
|
|
@@ -191,6 +192,16 @@ class Logger {
|
|
|
191
192
|
...redaction_1.defaultRedactionConfig,
|
|
192
193
|
...redaction_1.RedactionController.getEnvironmentConfig()
|
|
193
194
|
});
|
|
195
|
+
// Configure emoji selector once when logger config changes
|
|
196
|
+
// This allows the compiled regex cache to persist across log calls
|
|
197
|
+
const currentConfig = this.configManager.getConfig();
|
|
198
|
+
if (currentConfig.format?.emoji) {
|
|
199
|
+
formatter_1.EmojiSelector.configure(currentConfig.format.emoji);
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
// Reset to defaults when no emoji config is provided
|
|
203
|
+
formatter_1.EmojiSelector.reset();
|
|
204
|
+
}
|
|
194
205
|
}
|
|
195
206
|
/**
|
|
196
207
|
* Get current logger configuration
|
|
@@ -276,11 +287,12 @@ class Logger {
|
|
|
276
287
|
* Automatically redacts sensitive data when provided
|
|
277
288
|
* @param message - The debug message to log
|
|
278
289
|
* @param data - Optional data object to log (will be redacted)
|
|
290
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
279
291
|
*/
|
|
280
|
-
debug(message, data) {
|
|
292
|
+
debug(message, data, options) {
|
|
281
293
|
if (this.shouldLog(types_1.LogLevel.DEBUG)) {
|
|
282
294
|
const processedData = redaction_1.DataRedactor.redactData(data);
|
|
283
|
-
const formatted = this.formatMessage(types_1.LogLevel.DEBUG, message, processedData);
|
|
295
|
+
const formatted = this.formatMessage(types_1.LogLevel.DEBUG, message, processedData, options);
|
|
284
296
|
this.writeToOutput('debug', message, formatted, processedData);
|
|
285
297
|
}
|
|
286
298
|
}
|
|
@@ -290,11 +302,12 @@ class Logger {
|
|
|
290
302
|
* Automatically redacts sensitive data when provided
|
|
291
303
|
* @param message - The info message to log
|
|
292
304
|
* @param data - Optional data object to log (will be redacted)
|
|
305
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
293
306
|
*/
|
|
294
|
-
info(message, data) {
|
|
307
|
+
info(message, data, options) {
|
|
295
308
|
if (this.shouldLog(types_1.LogLevel.INFO)) {
|
|
296
309
|
const processedData = redaction_1.DataRedactor.redactData(data);
|
|
297
|
-
const formatted = this.formatMessage(types_1.LogLevel.INFO, message, processedData);
|
|
310
|
+
const formatted = this.formatMessage(types_1.LogLevel.INFO, message, processedData, options);
|
|
298
311
|
this.writeToOutput('info', message, formatted, processedData);
|
|
299
312
|
}
|
|
300
313
|
}
|
|
@@ -304,11 +317,12 @@ class Logger {
|
|
|
304
317
|
* Automatically redacts sensitive data when provided
|
|
305
318
|
* @param message - The warning message to log
|
|
306
319
|
* @param data - Optional data object to log (will be redacted)
|
|
320
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
307
321
|
*/
|
|
308
|
-
warn(message, data) {
|
|
322
|
+
warn(message, data, options) {
|
|
309
323
|
if (this.shouldLog(types_1.LogLevel.WARN)) {
|
|
310
324
|
const processedData = redaction_1.DataRedactor.redactData(data);
|
|
311
|
-
const formatted = this.formatMessage(types_1.LogLevel.WARN, message, processedData);
|
|
325
|
+
const formatted = this.formatMessage(types_1.LogLevel.WARN, message, processedData, options);
|
|
312
326
|
this.writeToOutput('warn', message, formatted, processedData, false, true);
|
|
313
327
|
}
|
|
314
328
|
}
|
|
@@ -318,11 +332,12 @@ class Logger {
|
|
|
318
332
|
* Automatically redacts sensitive data when provided
|
|
319
333
|
* @param message - The error message to log
|
|
320
334
|
* @param data - Optional data object to log (will be redacted)
|
|
335
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
321
336
|
*/
|
|
322
|
-
error(message, data) {
|
|
337
|
+
error(message, data, options) {
|
|
323
338
|
if (this.shouldLog(types_1.LogLevel.ERROR)) {
|
|
324
339
|
const processedData = redaction_1.DataRedactor.redactData(data);
|
|
325
|
-
const formatted = this.formatMessage(types_1.LogLevel.ERROR, message, processedData);
|
|
340
|
+
const formatted = this.formatMessage(types_1.LogLevel.ERROR, message, processedData, options);
|
|
326
341
|
this.writeToOutput('error', message, formatted, processedData, true, false);
|
|
327
342
|
}
|
|
328
343
|
}
|
|
@@ -333,11 +348,12 @@ class Logger {
|
|
|
333
348
|
* Automatically redacts sensitive data when provided
|
|
334
349
|
* @param message - The log message to output
|
|
335
350
|
* @param data - Optional data object to log (will be redacted)
|
|
351
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
336
352
|
*/
|
|
337
|
-
log(message, data) {
|
|
353
|
+
log(message, data, options) {
|
|
338
354
|
if (this.shouldLog(types_1.LogLevel.LOG)) {
|
|
339
355
|
const processedData = redaction_1.DataRedactor.redactData(data);
|
|
340
|
-
const formatted = this.formatMessage(types_1.LogLevel.LOG, message, processedData);
|
|
356
|
+
const formatted = this.formatMessage(types_1.LogLevel.LOG, message, processedData, options);
|
|
341
357
|
this.writeToOutput('log', message, formatted, processedData);
|
|
342
358
|
}
|
|
343
359
|
}
|
|
@@ -346,10 +362,11 @@ class Logger {
|
|
|
346
362
|
* Log a debug message without data redaction
|
|
347
363
|
* @param message - The debug message to log
|
|
348
364
|
* @param data - Optional data object to log (no redaction applied)
|
|
365
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
349
366
|
*/
|
|
350
|
-
debugRaw(message, data) {
|
|
367
|
+
debugRaw(message, data, options) {
|
|
351
368
|
if (this.shouldLog(types_1.LogLevel.DEBUG)) {
|
|
352
|
-
const formatted = this.formatMessage(types_1.LogLevel.DEBUG, message, data);
|
|
369
|
+
const formatted = this.formatMessage(types_1.LogLevel.DEBUG, message, data, options);
|
|
353
370
|
this.writeToOutput('debug', message, formatted, data);
|
|
354
371
|
}
|
|
355
372
|
}
|
|
@@ -357,10 +374,11 @@ class Logger {
|
|
|
357
374
|
* Log an info message without data redaction
|
|
358
375
|
* @param message - The info message to log
|
|
359
376
|
* @param data - Optional data object to log (no redaction applied)
|
|
377
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
360
378
|
*/
|
|
361
|
-
infoRaw(message, data) {
|
|
379
|
+
infoRaw(message, data, options) {
|
|
362
380
|
if (this.shouldLog(types_1.LogLevel.INFO)) {
|
|
363
|
-
const formatted = this.formatMessage(types_1.LogLevel.INFO, message, data);
|
|
381
|
+
const formatted = this.formatMessage(types_1.LogLevel.INFO, message, data, options);
|
|
364
382
|
this.writeToOutput('info', message, formatted, data);
|
|
365
383
|
}
|
|
366
384
|
}
|
|
@@ -368,10 +386,11 @@ class Logger {
|
|
|
368
386
|
* Log a warning message without data redaction
|
|
369
387
|
* @param message - The warning message to log
|
|
370
388
|
* @param data - Optional data object to log (no redaction applied)
|
|
389
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
371
390
|
*/
|
|
372
|
-
warnRaw(message, data) {
|
|
391
|
+
warnRaw(message, data, options) {
|
|
373
392
|
if (this.shouldLog(types_1.LogLevel.WARN)) {
|
|
374
|
-
const formatted = this.formatMessage(types_1.LogLevel.WARN, message, data);
|
|
393
|
+
const formatted = this.formatMessage(types_1.LogLevel.WARN, message, data, options);
|
|
375
394
|
this.writeToOutput('warn', message, formatted, data, false, true);
|
|
376
395
|
}
|
|
377
396
|
}
|
|
@@ -379,10 +398,11 @@ class Logger {
|
|
|
379
398
|
* Log an error message without data redaction
|
|
380
399
|
* @param message - The error message to log
|
|
381
400
|
* @param data - Optional data object to log (no redaction applied)
|
|
401
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
382
402
|
*/
|
|
383
|
-
errorRaw(message, data) {
|
|
403
|
+
errorRaw(message, data, options) {
|
|
384
404
|
if (this.shouldLog(types_1.LogLevel.ERROR)) {
|
|
385
|
-
const formatted = this.formatMessage(types_1.LogLevel.ERROR, message, data);
|
|
405
|
+
const formatted = this.formatMessage(types_1.LogLevel.ERROR, message, data, options);
|
|
386
406
|
this.writeToOutput('error', message, formatted, data, true, false);
|
|
387
407
|
}
|
|
388
408
|
}
|
|
@@ -390,10 +410,11 @@ class Logger {
|
|
|
390
410
|
* Log a message without data redaction (always outputs unless mode is OFF)
|
|
391
411
|
* @param message - The log message to output
|
|
392
412
|
* @param data - Optional data object to log (no redaction applied)
|
|
413
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
393
414
|
*/
|
|
394
|
-
logRaw(message, data) {
|
|
415
|
+
logRaw(message, data, options) {
|
|
395
416
|
if (this.shouldLog(types_1.LogLevel.LOG)) {
|
|
396
|
-
const formatted = this.formatMessage(types_1.LogLevel.LOG, message, data);
|
|
417
|
+
const formatted = this.formatMessage(types_1.LogLevel.LOG, message, data, options);
|
|
397
418
|
this.writeToOutput('log', message, formatted, data);
|
|
398
419
|
}
|
|
399
420
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Uses colorized console output with timestamps for better readability
|
|
6
6
|
* Includes automatic data redaction for sensitive information
|
|
7
7
|
*/
|
|
8
|
-
import { LoggerConfig, LogData } from '../types';
|
|
8
|
+
import { LoggerConfig, LogData, LogCallOptions } from '../types';
|
|
9
9
|
/**
|
|
10
10
|
* Logger class responsible for managing log output and configuration
|
|
11
11
|
* Provides mode-based filtering and formatted console output
|
|
@@ -32,6 +32,7 @@ export declare class Logger {
|
|
|
32
32
|
* @param level - The log level to format for
|
|
33
33
|
* @param message - The message content to format
|
|
34
34
|
* @param data - Optional data object to include in the log output
|
|
35
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
35
36
|
* @returns Formatted string with appropriate configuration applied
|
|
36
37
|
*/
|
|
37
38
|
private formatMessage;
|
|
@@ -102,32 +103,36 @@ export declare class Logger {
|
|
|
102
103
|
* Automatically redacts sensitive data when provided
|
|
103
104
|
* @param message - The debug message to log
|
|
104
105
|
* @param data - Optional data object to log (will be redacted)
|
|
106
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
105
107
|
*/
|
|
106
|
-
debug(message: string, data?: LogData): void;
|
|
108
|
+
debug(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
107
109
|
/**
|
|
108
110
|
* Log an informational message with INFO level formatting
|
|
109
111
|
* Uses console.log for output with blue coloring
|
|
110
112
|
* Automatically redacts sensitive data when provided
|
|
111
113
|
* @param message - The info message to log
|
|
112
114
|
* @param data - Optional data object to log (will be redacted)
|
|
115
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
113
116
|
*/
|
|
114
|
-
info(message: string, data?: LogData): void;
|
|
117
|
+
info(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
115
118
|
/**
|
|
116
119
|
* Log a warning message with WARN level formatting
|
|
117
120
|
* Uses console.warn for output with yellow coloring
|
|
118
121
|
* Automatically redacts sensitive data when provided
|
|
119
122
|
* @param message - The warning message to log
|
|
120
123
|
* @param data - Optional data object to log (will be redacted)
|
|
124
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
121
125
|
*/
|
|
122
|
-
warn(message: string, data?: LogData): void;
|
|
126
|
+
warn(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
123
127
|
/**
|
|
124
128
|
* Log an error message with ERROR level formatting
|
|
125
129
|
* Uses console.error for output with red coloring
|
|
126
130
|
* Automatically redacts sensitive data when provided
|
|
127
131
|
* @param message - The error message to log
|
|
128
132
|
* @param data - Optional data object to log (will be redacted)
|
|
133
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
129
134
|
*/
|
|
130
|
-
error(message: string, data?: LogData): void;
|
|
135
|
+
error(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
131
136
|
/**
|
|
132
137
|
* Log a message with LOG level formatting (always outputs unless mode is OFF)
|
|
133
138
|
* Uses console.log for output with green coloring
|
|
@@ -135,37 +140,43 @@ export declare class Logger {
|
|
|
135
140
|
* Automatically redacts sensitive data when provided
|
|
136
141
|
* @param message - The log message to output
|
|
137
142
|
* @param data - Optional data object to log (will be redacted)
|
|
143
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
138
144
|
*/
|
|
139
|
-
log(message: string, data?: LogData): void;
|
|
145
|
+
log(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
140
146
|
/**
|
|
141
147
|
* Log a debug message without data redaction
|
|
142
148
|
* @param message - The debug message to log
|
|
143
149
|
* @param data - Optional data object to log (no redaction applied)
|
|
150
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
144
151
|
*/
|
|
145
|
-
debugRaw(message: string, data?: LogData): void;
|
|
152
|
+
debugRaw(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
146
153
|
/**
|
|
147
154
|
* Log an info message without data redaction
|
|
148
155
|
* @param message - The info message to log
|
|
149
156
|
* @param data - Optional data object to log (no redaction applied)
|
|
157
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
150
158
|
*/
|
|
151
|
-
infoRaw(message: string, data?: LogData): void;
|
|
159
|
+
infoRaw(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
152
160
|
/**
|
|
153
161
|
* Log a warning message without data redaction
|
|
154
162
|
* @param message - The warning message to log
|
|
155
163
|
* @param data - Optional data object to log (no redaction applied)
|
|
164
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
156
165
|
*/
|
|
157
|
-
warnRaw(message: string, data?: LogData): void;
|
|
166
|
+
warnRaw(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
158
167
|
/**
|
|
159
168
|
* Log an error message without data redaction
|
|
160
169
|
* @param message - The error message to log
|
|
161
170
|
* @param data - Optional data object to log (no redaction applied)
|
|
171
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
162
172
|
*/
|
|
163
|
-
errorRaw(message: string, data?: LogData): void;
|
|
173
|
+
errorRaw(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
164
174
|
/**
|
|
165
175
|
* Log a message without data redaction (always outputs unless mode is OFF)
|
|
166
176
|
* @param message - The log message to output
|
|
167
177
|
* @param data - Optional data object to log (no redaction applied)
|
|
178
|
+
* @param options - Optional per-call options (e.g., emoji override)
|
|
168
179
|
*/
|
|
169
|
-
logRaw(message: string, data?: LogData): void;
|
|
180
|
+
logRaw(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
170
181
|
}
|
|
171
182
|
//# sourceMappingURL=core.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/logger/core.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAqB,YAAY,EAAwD,OAAO,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/logger/core.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAqB,YAAY,EAAwD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAO1I;;;GAGG;AACH,qBAAa,MAAM;IACjB,OAAO,CAAC,aAAa,CAAsB;IAC3C,OAAO,CAAC,YAAY,CAA6B;IAEjD;;SAEK;;IAKL;;;OAGG;IACH,OAAO,CAAC,eAAe;IAOvB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAI7B;;;;;;;;OAQG;IACH,OAAO,CAAC,aAAa;IAKrB;;SAEK;IAEL,OAAO,CAAC,iBAAiB;IAsCzB;;;;;;;;SAQK;IACL,OAAO,CAAC,mBAAmB;IA6C3B;;;;;;;SAOK;IACL,OAAO,CAAC,cAAc;IAMtB;;;;;;;SAOK;IACL,OAAO,CAAC,sBAAsB;IAM9B;;;;SAIK;IACL,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI;IAuB9C;;;SAGK;IACL,SAAS,IAAI,YAAY;IAIzB;;;;SAIK;IACL,OAAO,CAAC,SAAS;IAMjB;;;;;;;;;;SAUK;IACL,OAAO,CAAC,aAAa;IAkDrB;;;;;;;SAOK;IACL,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI;IAQtE;;;;;;;SAOK;IACL,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI;IAQrE;;;;;;;SAOK;IACL,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI;IAQrE;;;;;;;SAOK;IACL,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI;IAQtE;;;;;;;;SAQK;IACL,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI;IASpE;;;;;SAKK;IACL,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI;IAOzE;;;;;SAKK;IACL,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI;IAOxE;;;;;SAKK;IACL,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI;IAOxE;;;;;SAKK;IACL,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI;IAOzE;;;;;SAKK;IACL,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI;CAMxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../../src/logger/core.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../../src/logger/core.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,oCAA0I;AAC1I,4CAA2D;AA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CAAC;YAC3E,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;CACF;AAraD,wBAqaC"}
|
|
@@ -7,6 +7,21 @@
|
|
|
7
7
|
* This is intentionally `any` rather than `unknown` for maximum usability in a logging context
|
|
8
8
|
*/
|
|
9
9
|
export type LogData = any;
|
|
10
|
+
/**
|
|
11
|
+
* Options for individual log method calls
|
|
12
|
+
* Allows per-call customization of log behavior
|
|
13
|
+
*/
|
|
14
|
+
export interface LogCallOptions {
|
|
15
|
+
/**
|
|
16
|
+
* Override the auto-detected emoji for this specific log call
|
|
17
|
+
* - Set to a specific emoji string to use that emoji
|
|
18
|
+
* - Set to empty string ('') to suppress emoji for this call
|
|
19
|
+
* - Leave undefined (or omit) to use auto-detection
|
|
20
|
+
* @example { emoji: '✅' } // Use check mark emoji for this call
|
|
21
|
+
* @example { emoji: '' } // Suppress emoji for this call
|
|
22
|
+
*/
|
|
23
|
+
emoji?: string;
|
|
24
|
+
}
|
|
10
25
|
/**
|
|
11
26
|
* Log levels representing message severity (lowest to highest)
|
|
12
27
|
* Used for filtering messages based on importance
|
|
@@ -129,6 +144,35 @@ export interface LogFormatConfig {
|
|
|
129
144
|
includeIsoTimestamp?: boolean;
|
|
130
145
|
/** Whether to include local time (e.g., [4:57PM]) */
|
|
131
146
|
includeLocalTime?: boolean;
|
|
147
|
+
/** Whether to include emoji in log output (enabled by default) */
|
|
148
|
+
includeEmoji?: boolean;
|
|
149
|
+
/** Configuration for customizing emoji mappings and fallbacks */
|
|
150
|
+
emoji?: EmojiConfig;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Emoji mapping definition for context-aware logging
|
|
154
|
+
*/
|
|
155
|
+
export interface EmojiMapping {
|
|
156
|
+
/** The emoji character to display */
|
|
157
|
+
emoji: string;
|
|
158
|
+
/** The emoji code (e.g., :bug:) */
|
|
159
|
+
code: string;
|
|
160
|
+
/** Description of when to use this emoji */
|
|
161
|
+
description?: string;
|
|
162
|
+
/** Keywords that trigger this emoji selection */
|
|
163
|
+
keywords: string[];
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Configuration for customizing emoji mappings and fallbacks
|
|
167
|
+
* Note: To enable/disable emoji, use LogFormatConfig.includeEmoji
|
|
168
|
+
*/
|
|
169
|
+
export interface EmojiConfig {
|
|
170
|
+
/** Custom emoji mappings to use instead of or in addition to defaults */
|
|
171
|
+
customMappings?: EmojiMapping[];
|
|
172
|
+
/** Custom fallback emoji for each level (DEBUG, INFO, WARN, ERROR, LOG) */
|
|
173
|
+
customFallbacks?: Partial<Record<'DEBUG' | 'INFO' | 'WARN' | 'ERROR' | 'LOG', string>>;
|
|
174
|
+
/** Whether to use custom mappings exclusively (ignore defaults) */
|
|
175
|
+
useCustomOnly?: boolean;
|
|
132
176
|
}
|
|
133
177
|
/**
|
|
134
178
|
* Configuration options for the logger
|
|
@@ -185,25 +229,25 @@ export interface ILogEngine {
|
|
|
185
229
|
/** Configure the logger with new settings */
|
|
186
230
|
configure(config: Partial<LoggerConfig>): void;
|
|
187
231
|
/** Log a debug message with automatic data redaction */
|
|
188
|
-
debug(message: string, data?: LogData): void;
|
|
232
|
+
debug(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
189
233
|
/** Log an info message with automatic data redaction */
|
|
190
|
-
info(message: string, data?: LogData): void;
|
|
234
|
+
info(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
191
235
|
/** Log a warn message with automatic data redaction */
|
|
192
|
-
warn(message: string, data?: LogData): void;
|
|
236
|
+
warn(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
193
237
|
/** Log an error message with automatic data redaction */
|
|
194
|
-
error(message: string, data?: LogData): void;
|
|
238
|
+
error(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
195
239
|
/** Log a message with automatic data redaction */
|
|
196
|
-
log(message: string, data?: LogData): void;
|
|
240
|
+
log(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
197
241
|
/** Log a debug message without redaction */
|
|
198
|
-
debugRaw(message: string, data?: LogData): void;
|
|
242
|
+
debugRaw(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
199
243
|
/** Log an info message without redaction */
|
|
200
|
-
infoRaw(message: string, data?: LogData): void;
|
|
244
|
+
infoRaw(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
201
245
|
/** Log a warn message without redaction */
|
|
202
|
-
warnRaw(message: string, data?: LogData): void;
|
|
246
|
+
warnRaw(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
203
247
|
/** Log an error message without redaction */
|
|
204
|
-
errorRaw(message: string, data?: LogData): void;
|
|
248
|
+
errorRaw(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
205
249
|
/** Log a message without redaction */
|
|
206
|
-
logRaw(message: string, data?: LogData): void;
|
|
250
|
+
logRaw(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
207
251
|
/** Configure redaction settings */
|
|
208
252
|
configureRedaction(config: Partial<RedactionConfig>): void;
|
|
209
253
|
/** Reset redaction configuration to defaults */
|
|
@@ -229,15 +273,15 @@ export interface ILogEngine {
|
|
|
229
273
|
*/
|
|
230
274
|
export interface ILogEngineWithoutRedaction {
|
|
231
275
|
/** Log a debug message without redaction */
|
|
232
|
-
debug(message: string, data?: LogData): void;
|
|
276
|
+
debug(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
233
277
|
/** Log an info message without redaction */
|
|
234
|
-
info(message: string, data?: LogData): void;
|
|
278
|
+
info(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
235
279
|
/** Log a warn message without redaction */
|
|
236
|
-
warn(message: string, data?: LogData): void;
|
|
280
|
+
warn(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
237
281
|
/** Log an error message without redaction */
|
|
238
|
-
error(message: string, data?: LogData): void;
|
|
282
|
+
error(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
239
283
|
/** Log a message without redaction */
|
|
240
|
-
log(message: string, data?: LogData): void;
|
|
284
|
+
log(message: string, data?: LogData, options?: LogCallOptions): void;
|
|
241
285
|
}
|
|
242
286
|
/**
|
|
243
287
|
* Interface for the DataRedactor static class methods
|