logixia 1.13.3 → 2.0.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.
- package/README.md +72 -16
- package/dist/{azure-monitor.transport-BDFO4F-i.d.ts → azure-monitor.transport-Cn_3Usvu.d.ts} +2 -2
- package/dist/{azure-monitor.transport-BDFO4F-i.d.ts.map → azure-monitor.transport-Cn_3Usvu.d.ts.map} +1 -1
- package/dist/{azure-monitor.transport-D5wQEH04.d.mts → azure-monitor.transport-D7Da4RAb.d.mts} +2 -2
- package/dist/{azure-monitor.transport-D5wQEH04.d.mts.map → azure-monitor.transport-D7Da4RAb.d.mts.map} +1 -1
- package/dist/azure.d.mts +2 -2
- package/dist/azure.d.ts +2 -2
- package/dist/browser.d.mts +9 -0
- package/dist/browser.d.mts.map +1 -1
- package/dist/browser.d.ts +9 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +43 -12
- package/dist/browser.js.map +1 -1
- package/dist/browser.mjs +43 -12
- package/dist/browser.mjs.map +1 -1
- package/dist/{nestjs-extras-ImbuDhs1.mjs → builder-0gEzRopq.mjs} +77 -871
- package/dist/builder-0gEzRopq.mjs.map +1 -0
- package/dist/{nestjs-extras-DnJ6vrIC.js → builder-D44QktIo.js} +81 -943
- package/dist/builder-D44QktIo.js.map +1 -0
- package/dist/cli/index.js +32 -13
- package/dist/cloudwatch.d.mts +2 -2
- package/dist/cloudwatch.d.ts +2 -2
- package/dist/{cloudwatch.transport-B00st6Xv.d.ts → cloudwatch.transport-DsEq633o.d.ts} +2 -2
- package/dist/{cloudwatch.transport-B00st6Xv.d.ts.map → cloudwatch.transport-DsEq633o.d.ts.map} +1 -1
- package/dist/{cloudwatch.transport-Blc7Gtxt.d.mts → cloudwatch.transport-UlyZFWMn.d.mts} +2 -2
- package/dist/{cloudwatch.transport-Blc7Gtxt.d.mts.map → cloudwatch.transport-UlyZFWMn.d.mts.map} +1 -1
- package/dist/gcp.d.mts +2 -2
- package/dist/gcp.d.ts +2 -2
- package/dist/{gcp.transport-m4fVw0b1.d.ts → gcp.transport-B7oc97sG.d.ts} +2 -2
- package/dist/{gcp.transport-m4fVw0b1.d.ts.map → gcp.transport-B7oc97sG.d.ts.map} +1 -1
- package/dist/{gcp.transport-zzNyIoih.d.mts → gcp.transport-GrJurKo8.d.mts} +2 -2
- package/dist/{gcp.transport-zzNyIoih.d.mts.map → gcp.transport-GrJurKo8.d.mts.map} +1 -1
- package/dist/{index-BPwEisy4.d.mts → index-3mw5gaCw.d.mts} +2 -2
- package/dist/{index-BPwEisy4.d.mts.map → index-3mw5gaCw.d.mts.map} +1 -1
- package/dist/{index-nZEeCr3X.d.ts → index-DhIoploR.d.ts} +2 -2
- package/dist/{index-nZEeCr3X.d.ts.map → index-DhIoploR.d.ts.map} +1 -1
- package/dist/index.d.mts +44 -47
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +44 -47
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +38 -126
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -58
- package/dist/index.mjs.map +1 -1
- package/dist/logitron-logger-BFDSO8Io.d.mts +257 -0
- package/dist/logitron-logger-BFDSO8Io.d.mts.map +1 -0
- package/dist/logitron-logger-UVeN-mQm.d.ts +257 -0
- package/dist/logitron-logger-UVeN-mQm.d.ts.map +1 -0
- package/dist/middleware.d.mts +2 -2
- package/dist/middleware.d.ts +2 -2
- package/dist/nest.d.mts +481 -6
- package/dist/nest.d.mts.map +1 -1
- package/dist/nest.d.ts +481 -6
- package/dist/nest.d.ts.map +1 -1
- package/dist/nest.js +877 -15
- package/dist/nest.js.map +1 -0
- package/dist/nest.mjs +861 -6
- package/dist/nest.mjs.map +1 -0
- package/dist/{search-DjXSn6v5.mjs → search-BFbu_oVn.mjs} +13 -3
- package/dist/{search-DjXSn6v5.mjs.map → search-BFbu_oVn.mjs.map} +1 -1
- package/dist/{search-B0MH1SJJ.js → search-C4V0OMEn.js} +13 -3
- package/dist/{search-B0MH1SJJ.js.map → search-C4V0OMEn.js.map} +1 -1
- package/dist/{search-CHUZPl0h.d.ts → search-CNh9uVwR.d.ts} +2 -2
- package/dist/search-CNh9uVwR.d.ts.map +1 -0
- package/dist/{search-BfBzDIT9.d.mts → search-DXANsQ2n.d.mts} +2 -2
- package/dist/{search-CHUZPl0h.d.ts.map → search-DXANsQ2n.d.mts.map} +1 -1
- package/dist/search.d.mts +3 -3
- package/dist/search.d.ts +3 -3
- package/dist/search.js +1 -1
- package/dist/search.mjs +1 -1
- package/dist/slack.transport-BZzoXDPn.d.mts +112 -0
- package/dist/slack.transport-BZzoXDPn.d.mts.map +1 -0
- package/dist/slack.transport-BfJRouB2.js +654 -0
- package/dist/slack.transport-BfJRouB2.js.map +1 -0
- package/dist/slack.transport-Bzw7sucI.mjs +643 -0
- package/dist/slack.transport-Bzw7sucI.mjs.map +1 -0
- package/dist/slack.transport-CXjQYOes.d.ts +112 -0
- package/dist/slack.transport-CXjQYOes.d.ts.map +1 -0
- package/dist/testing.d.mts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/{transport.manager-CpdVHEGP.mjs → transport.manager-BiuCAJd2.mjs} +171 -84
- package/dist/transport.manager-BiuCAJd2.mjs.map +1 -0
- package/dist/{transport.manager-Crau3Rle.js → transport.manager-CXbKKdVE.js} +176 -83
- package/dist/transport.manager-CXbKKdVE.js.map +1 -0
- package/dist/{transport.types-CtNr3D7S.d.mts → transport.types-BMnurPcc.d.mts} +5 -2
- package/dist/transport.types-BMnurPcc.d.mts.map +1 -0
- package/dist/{transport.types-DqVLZTyf.d.ts → transport.types-CGoHpWQR.d.ts} +5 -2
- package/dist/transport.types-CGoHpWQR.d.ts.map +1 -0
- package/dist/transports.d.mts +18 -13
- package/dist/transports.d.mts.map +1 -1
- package/dist/transports.d.ts +18 -13
- package/dist/transports.d.ts.map +1 -1
- package/dist/transports.js +5 -2
- package/dist/transports.mjs +4 -3
- package/dist/worker.d.mts +2 -2
- package/dist/worker.d.ts +2 -2
- package/dist/worker.js +1 -1
- package/dist/worker.mjs +1 -1
- package/dist/{worker.transport-JP8YHBuU.js → worker.transport-BdPxu3PN.js} +1 -1
- package/dist/{worker.transport-JP8YHBuU.js.map → worker.transport-BdPxu3PN.js.map} +1 -1
- package/dist/{worker.transport-Bj-i0P9V.d.ts → worker.transport-CdzSZJmw.d.ts} +2 -2
- package/dist/{worker.transport-Bj-i0P9V.d.ts.map → worker.transport-CdzSZJmw.d.ts.map} +1 -1
- package/dist/{worker.transport-Bgv9heDI.d.mts → worker.transport-JvGPog3C.d.mts} +2 -2
- package/dist/{worker.transport-Bgv9heDI.d.mts.map → worker.transport-JvGPog3C.d.mts.map} +1 -1
- package/dist/{worker.transport-otwhJ_Et.mjs → worker.transport-lPxO2MVL.mjs} +1 -1
- package/dist/{worker.transport-otwhJ_Et.mjs.map → worker.transport-lPxO2MVL.mjs.map} +1 -1
- package/package.json +18 -9
- package/dist/nestjs-extras-DnJ6vrIC.js.map +0 -1
- package/dist/nestjs-extras-ImbuDhs1.mjs.map +0 -1
- package/dist/nestjs-extras-OkC796py.d.mts +0 -725
- package/dist/nestjs-extras-OkC796py.d.mts.map +0 -1
- package/dist/nestjs-extras-mKrHE9S6.d.ts +0 -725
- package/dist/nestjs-extras-mKrHE9S6.d.ts.map +0 -1
- package/dist/search-BfBzDIT9.d.mts.map +0 -1
- package/dist/transport.manager-CpdVHEGP.mjs.map +0 -1
- package/dist/transport.manager-Crau3Rle.js.map +0 -1
- package/dist/transport.types-CtNr3D7S.d.mts.map +0 -1
- package/dist/transport.types-DqVLZTyf.d.ts.map +0 -1
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { b as LoggerWithLevels, f as ILogger, h as LogEntry, p as ILoggerDefault, v as LogLevelString, x as NamespaceLevels, y as LoggerConfig } from "./index-3mw5gaCw.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/plugin.d.ts
|
|
4
|
+
|
|
5
|
+
interface LogixiaPlugin {
|
|
6
|
+
/**
|
|
7
|
+
* Unique plugin name.
|
|
8
|
+
* logixia uses this to prevent duplicate registration of the same plugin
|
|
9
|
+
* on the same logger instance.
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* Called once immediately after `logger.use(plugin)` is called.
|
|
14
|
+
* Use for one-time setup (open connections, allocate buffers, etc.).
|
|
15
|
+
* Async `onInit` errors are silently swallowed to avoid blocking the logger.
|
|
16
|
+
*/
|
|
17
|
+
onInit?(): void | Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Called for every log entry **after** PII redaction and **before** transport
|
|
20
|
+
* dispatch. Plugins run in registration order; each receives the (possibly
|
|
21
|
+
* modified) output of the previous plugin.
|
|
22
|
+
*
|
|
23
|
+
* - Return the entry (modified or unchanged) to continue processing.
|
|
24
|
+
* - Return `null` to **drop** the entry — no transport will receive it.
|
|
25
|
+
*
|
|
26
|
+
* Errors thrown inside `onLog` are swallowed so a buggy plugin cannot crash
|
|
27
|
+
* logging; the chain continues with the previous (un-transformed) entry.
|
|
28
|
+
*/
|
|
29
|
+
onLog?(entry: LogEntry): LogEntry | null | Promise<LogEntry | null>;
|
|
30
|
+
/**
|
|
31
|
+
* Called when a transport write fails (after any configured retries).
|
|
32
|
+
* Useful for routing transport errors to an alerting or metrics system.
|
|
33
|
+
* Errors thrown inside `onError` are silently swallowed.
|
|
34
|
+
*/
|
|
35
|
+
onError?(error: Error, entry?: LogEntry): void | Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Called when the logger is closed via `logger.close()` or the process
|
|
38
|
+
* receives a shutdown signal (when `gracefulShutdown` is enabled).
|
|
39
|
+
* Errors thrown inside `onShutdown` are silently swallowed.
|
|
40
|
+
*/
|
|
41
|
+
onShutdown?(): void | Promise<void>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Holds an ordered list of `LogixiaPlugin` instances and dispatches lifecycle
|
|
45
|
+
* events to them. One registry is created per logger instance; a global
|
|
46
|
+
* singleton is also exported for process-wide registration.
|
|
47
|
+
*/
|
|
48
|
+
declare class PluginRegistry {
|
|
49
|
+
private readonly _plugins;
|
|
50
|
+
/**
|
|
51
|
+
* Register a plugin. Silently skips if a plugin with the same `name` is
|
|
52
|
+
* already registered on this registry.
|
|
53
|
+
*/
|
|
54
|
+
register(plugin: LogixiaPlugin): void;
|
|
55
|
+
/** Remove a previously registered plugin by name. No-op if not found. */
|
|
56
|
+
unregister(name: string): void;
|
|
57
|
+
/** Returns `true` if a plugin with the given name is registered. */
|
|
58
|
+
has(name: string): boolean;
|
|
59
|
+
/** Number of currently registered plugins. */
|
|
60
|
+
get size(): number;
|
|
61
|
+
/**
|
|
62
|
+
* Run all `onLog` hooks in order.
|
|
63
|
+
* Returns `null` if any plugin cancels the entry; otherwise returns the
|
|
64
|
+
* (possibly transformed) entry.
|
|
65
|
+
*/
|
|
66
|
+
runOnLog(entry: LogEntry): Promise<LogEntry | null>;
|
|
67
|
+
/**
|
|
68
|
+
* Notify all `onError` hooks.
|
|
69
|
+
* Errors thrown inside hooks are swallowed to prevent error cascades.
|
|
70
|
+
*/
|
|
71
|
+
runOnError(error: Error, entry?: LogEntry): Promise<void>;
|
|
72
|
+
/** Run all `onShutdown` hooks concurrently. Hook errors are swallowed. */
|
|
73
|
+
runOnShutdown(): Promise<void>;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Module-level singleton registry.
|
|
77
|
+
*
|
|
78
|
+
* Plugins registered here are automatically copied into every **new** logger
|
|
79
|
+
* instance created after the registration. Already-created loggers are not
|
|
80
|
+
* retroactively affected — use `logger.use(plugin)` for per-instance control.
|
|
81
|
+
*/
|
|
82
|
+
declare const globalPluginRegistry: PluginRegistry;
|
|
83
|
+
/**
|
|
84
|
+
* Register a plugin in the global registry so it applies to every future
|
|
85
|
+
* logger instance.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts
|
|
89
|
+
* import { usePlugin } from 'logixia';
|
|
90
|
+
*
|
|
91
|
+
* usePlugin({
|
|
92
|
+
* name: 'audit-sink',
|
|
93
|
+
* onLog(entry) {
|
|
94
|
+
* if (entry.level === 'error') auditQueue.push(entry);
|
|
95
|
+
* return entry;
|
|
96
|
+
* },
|
|
97
|
+
* });
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
declare function usePlugin(plugin: LogixiaPlugin): void;
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/core/logitron-logger.d.ts
|
|
103
|
+
declare class LogixiaLogger<TConfig extends LoggerConfig<Record<string, number>> = LoggerConfig> implements ILoggerDefault {
|
|
104
|
+
[K: string]: any;
|
|
105
|
+
private config;
|
|
106
|
+
private context?;
|
|
107
|
+
private timers;
|
|
108
|
+
private contextData;
|
|
109
|
+
private transportManager;
|
|
110
|
+
private fieldState;
|
|
111
|
+
/** Stable fallback trace ID generated ONCE per logger instance. */
|
|
112
|
+
private readonly fallbackTraceId;
|
|
113
|
+
/** Numeric value for each known log level — built once, read on every log call. */
|
|
114
|
+
private _levelValues;
|
|
115
|
+
/** Numeric threshold for the currently active log level. */
|
|
116
|
+
private _minLevelValue;
|
|
117
|
+
/** `source=value` pairs already reported as unknown levels — warn once per logger. */
|
|
118
|
+
private readonly _warnedInvalidLevels;
|
|
119
|
+
/** Pre-built ANSI color codes to avoid recreating the object in colorize(). */
|
|
120
|
+
private _colorMap;
|
|
121
|
+
/** Pre-computed field-enabled booleans so isFieldEnabled() isn't called per log. */
|
|
122
|
+
private _fieldCache;
|
|
123
|
+
/** True when contextData is non-empty — avoids Object.keys() check on hot path. */
|
|
124
|
+
private _hasContextData;
|
|
125
|
+
/**
|
|
126
|
+
* Pre-computed `[INFO] `, `[WARN] ` etc. strings — avoids a colorize() call per log.
|
|
127
|
+
* Key: lowercase level name. Value: formatted bracket string ready to concatenate.
|
|
128
|
+
*/
|
|
129
|
+
private _formattedLevels;
|
|
130
|
+
/** Pre-computed `[appName] ` string — avoids template literal allocation per log. */
|
|
131
|
+
private _formattedAppName;
|
|
132
|
+
/** True when a redact config is present — short-circuits applyRedaction when false. */
|
|
133
|
+
private _hasRedact;
|
|
134
|
+
/** Sampling engine — only created when sampling config is present. */
|
|
135
|
+
private _sampler;
|
|
136
|
+
/** Per-instance plugin registry — also inherits from the global registry at creation time. */
|
|
137
|
+
private readonly _pluginRegistry;
|
|
138
|
+
/** Set on loggers created by child(); they borrow the root's transports, sampler and plugins. */
|
|
139
|
+
private readonly _parent;
|
|
140
|
+
constructor(config: TConfig, context?: string, parent?: LogixiaLogger<TConfig>);
|
|
141
|
+
private setupGracefulShutdown;
|
|
142
|
+
private createCustomLevelMethods;
|
|
143
|
+
/**
|
|
144
|
+
* Rebuild all hot-path caches after any config mutation or level change.
|
|
145
|
+
* Keeps the actual log() call free of allocations in the common case.
|
|
146
|
+
*/
|
|
147
|
+
private _buildPerfCaches;
|
|
148
|
+
error(messageOrError: string | Error, data?: Record<string, unknown>): Promise<void>;
|
|
149
|
+
warn(message: string, data?: Record<string, unknown>): Promise<void>;
|
|
150
|
+
info(message: string, data?: Record<string, unknown>): Promise<void>;
|
|
151
|
+
debug(message: string, data?: Record<string, unknown>): Promise<void>;
|
|
152
|
+
trace(message: string, data?: Record<string, unknown>): Promise<void>;
|
|
153
|
+
verbose(message: string, data?: Record<string, unknown>): Promise<void>;
|
|
154
|
+
logLevel(level: string, message: string, data?: Record<string, unknown>): Promise<void>;
|
|
155
|
+
time(label: string): void;
|
|
156
|
+
timeEnd(label: string): Promise<number | undefined>;
|
|
157
|
+
timeAsync<T>(label: string, fn: () => Promise<T>): Promise<T>;
|
|
158
|
+
setLevel(level: LogLevelString): void;
|
|
159
|
+
getLevel(): LogLevelString;
|
|
160
|
+
private _validLevelList;
|
|
161
|
+
/**
|
|
162
|
+
* Canonicalise a level from config/ENV. Unknown values return undefined so the
|
|
163
|
+
* caller falls through to the next source, and warn once per logger per source.
|
|
164
|
+
*/
|
|
165
|
+
private _validLevel;
|
|
166
|
+
/**
|
|
167
|
+
* Replace the per-namespace level map at runtime — no restart needed.
|
|
168
|
+
*
|
|
169
|
+
* This is the runtime counterpart to the `namespaceLevels` config option and
|
|
170
|
+
* the most-requested logging feature across the Winston/Pino issue trackers
|
|
171
|
+
* (flip a module's verbosity live to chase a bug without raising global
|
|
172
|
+
* volume). The new map fully replaces the previous one.
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```ts
|
|
176
|
+
* // Turn on debug for the DB layer only, live:
|
|
177
|
+
* logger.setNamespaceLevels({ 'db.*': 'debug', '*': 'info' });
|
|
178
|
+
* ```
|
|
179
|
+
*/
|
|
180
|
+
setNamespaceLevels(levels: NamespaceLevels): void;
|
|
181
|
+
/** Merge entries into the existing per-namespace level map at runtime. */
|
|
182
|
+
patchNamespaceLevels(levels: NamespaceLevels): void;
|
|
183
|
+
/** Return a copy of the current per-namespace level map. */
|
|
184
|
+
getNamespaceLevels(): NamespaceLevels;
|
|
185
|
+
setContext(context: string): void;
|
|
186
|
+
getContext(): string | undefined;
|
|
187
|
+
enableField(fieldName: string): void;
|
|
188
|
+
disableField(fieldName: string): void;
|
|
189
|
+
isFieldEnabled(fieldName: string): boolean;
|
|
190
|
+
getFieldState(): Record<string, boolean>;
|
|
191
|
+
resetFieldState(): void;
|
|
192
|
+
/** @deprecated No-op. Library code never prompts on stdin; use setTransportLevels(). */
|
|
193
|
+
enableTransportLevelPrompting(): void;
|
|
194
|
+
/** @deprecated No-op. */
|
|
195
|
+
disableTransportLevelPrompting(): void;
|
|
196
|
+
setTransportLevels(transportId: string, levels: string[]): void;
|
|
197
|
+
getTransportLevels(transportId: string): string[] | undefined;
|
|
198
|
+
clearTransportLevelPreferences(): void;
|
|
199
|
+
getAvailableTransports(): string[];
|
|
200
|
+
child(context: string, data?: Record<string, unknown>): ILogger;
|
|
201
|
+
/**
|
|
202
|
+
* Register a plugin on this logger instance.
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* ```ts
|
|
206
|
+
* logger.use({
|
|
207
|
+
* name: 'audit',
|
|
208
|
+
* onLog(entry) { auditQueue.push(entry); return entry; },
|
|
209
|
+
* });
|
|
210
|
+
* ```
|
|
211
|
+
*/
|
|
212
|
+
use(plugin: LogixiaPlugin): this;
|
|
213
|
+
/**
|
|
214
|
+
* Remove a previously registered plugin by name.
|
|
215
|
+
* No-op if the plugin is not registered on this instance.
|
|
216
|
+
*/
|
|
217
|
+
unuse(pluginName: string): this;
|
|
218
|
+
flush(): Promise<void>;
|
|
219
|
+
healthCheck(): Promise<{
|
|
220
|
+
healthy: boolean;
|
|
221
|
+
details: Record<string, unknown>;
|
|
222
|
+
}>;
|
|
223
|
+
close(): Promise<void>;
|
|
224
|
+
private log;
|
|
225
|
+
/**
|
|
226
|
+
* Hot-path level check: a single Map lookup + integer compare.
|
|
227
|
+
* The level map and threshold are pre-built in _buildPerfCaches().
|
|
228
|
+
*/
|
|
229
|
+
private shouldLog;
|
|
230
|
+
/**
|
|
231
|
+
* Feature 3: Resolve the effective log level for this logger instance.
|
|
232
|
+
*
|
|
233
|
+
* Priority:
|
|
234
|
+
* 1. ENV `LOGIXIA_LEVEL_<NS_UPPER>` (e.g. LOGIXIA_LEVEL_DB for ns "db" or "db.queries")
|
|
235
|
+
* 2. Matching `namespaceLevels` config entry (longer pattern = more specific, wins)
|
|
236
|
+
* 3. Global `LOGIXIA_LEVEL` ENV override
|
|
237
|
+
* 4. `levelOptions.level` (resolved via Feature 5 in constructor)
|
|
238
|
+
*/
|
|
239
|
+
private resolveEffectiveLevel;
|
|
240
|
+
private formatLog;
|
|
241
|
+
private colorize;
|
|
242
|
+
/**
|
|
243
|
+
* Dispatch the entry to transports (each formats itself). Returns `void` when
|
|
244
|
+
* the write completes synchronously (console-only hot path) and a Promise only
|
|
245
|
+
* when a transport is genuinely async — so the caller awaits only when needed.
|
|
246
|
+
* Formatting for the no-transport fallback is done lazily, never on the
|
|
247
|
+
* transport path.
|
|
248
|
+
*/
|
|
249
|
+
private output;
|
|
250
|
+
/** Shared transport-failure handler: log internally, notify plugins, then fall
|
|
251
|
+
* back to a direct stdout/stderr write so the entry is never lost. */
|
|
252
|
+
private _handleOutputError;
|
|
253
|
+
}
|
|
254
|
+
declare function createLogger<T extends LoggerConfig<Record<string, number>>>(config: T, context?: string): LoggerWithLevels<T>;
|
|
255
|
+
//#endregion
|
|
256
|
+
export { globalPluginRegistry as a, PluginRegistry as i, createLogger as n, usePlugin as o, LogixiaPlugin as r, LogixiaLogger as t };
|
|
257
|
+
//# sourceMappingURL=logitron-logger-BFDSO8Io.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logitron-logger-BFDSO8Io.d.mts","names":[],"sources":["../src/plugin.ts","../src/core/logitron-logger.ts"],"sourcesContent":[],"mappings":";;;;AC2K+B,UDzId,aAAA,CCyIc;EAAb;;;;;EA4SqB,IAAA,EAAA,MAAA;EAAc;;;;;EAeU,MAAA,GAAA,EAAA,IAAA,GDvb3C,OCub2C,CAAA,IAAA,CAAA;EAIzB;;;;;;;;;;;EAyC6B,KAAA,EAAA,KAAA,EDvdnD,QCudmD,CAAA,EDvdxC,QCudwC,GAAA,IAAA,GDvdtB,OCudsB,CDvdd,QCudc,GAAA,IAAA,CAAA;EAAR;;;;;EAwFnC,OAAA,EAAA,KAAA,EDxiBN,KCwiBM,EAAA,KAAA,CAAA,EDxiBS,QCwiBT,CAAA,EAAA,IAAA,GDxiB2B,OCwiB3B,CAAA,IAAA,CAAA;EAsCL;;;;;EAyGyC,UAAA,GAAA,EAAA,IAAA,GDhrBpC,OCgrBoC,CAAA,IAAA,CAAA;;;;;AA0R5D;;AAAuC,cDh8B1B,cAAA,CCg8B0B;EAC7B,iBAAA,QAAA;EAEU;;;;mBD57BD;;;;;;;;;;;;kBAqCK,WAAW,QAAQ;;;;;oBAsBjB,eAAe,WAAW;;mBAiB3B;;;;;;;;;cA2BZ,sBAAoB;;;;;;;;;;;;;;;;;;iBAmBjB,SAAA,SAAkB;;;AArFC,cC0CtB,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BAmRD,uBAAuB,aAAa,iCAC1C,sBAEP,iBAAiB"}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { b as LoggerWithLevels, f as ILogger, h as LogEntry, p as ILoggerDefault, v as LogLevelString, x as NamespaceLevels, y as LoggerConfig } from "./index-DhIoploR.js";
|
|
2
|
+
|
|
3
|
+
//#region src/plugin.d.ts
|
|
4
|
+
|
|
5
|
+
interface LogixiaPlugin {
|
|
6
|
+
/**
|
|
7
|
+
* Unique plugin name.
|
|
8
|
+
* logixia uses this to prevent duplicate registration of the same plugin
|
|
9
|
+
* on the same logger instance.
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* Called once immediately after `logger.use(plugin)` is called.
|
|
14
|
+
* Use for one-time setup (open connections, allocate buffers, etc.).
|
|
15
|
+
* Async `onInit` errors are silently swallowed to avoid blocking the logger.
|
|
16
|
+
*/
|
|
17
|
+
onInit?(): void | Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Called for every log entry **after** PII redaction and **before** transport
|
|
20
|
+
* dispatch. Plugins run in registration order; each receives the (possibly
|
|
21
|
+
* modified) output of the previous plugin.
|
|
22
|
+
*
|
|
23
|
+
* - Return the entry (modified or unchanged) to continue processing.
|
|
24
|
+
* - Return `null` to **drop** the entry — no transport will receive it.
|
|
25
|
+
*
|
|
26
|
+
* Errors thrown inside `onLog` are swallowed so a buggy plugin cannot crash
|
|
27
|
+
* logging; the chain continues with the previous (un-transformed) entry.
|
|
28
|
+
*/
|
|
29
|
+
onLog?(entry: LogEntry): LogEntry | null | Promise<LogEntry | null>;
|
|
30
|
+
/**
|
|
31
|
+
* Called when a transport write fails (after any configured retries).
|
|
32
|
+
* Useful for routing transport errors to an alerting or metrics system.
|
|
33
|
+
* Errors thrown inside `onError` are silently swallowed.
|
|
34
|
+
*/
|
|
35
|
+
onError?(error: Error, entry?: LogEntry): void | Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Called when the logger is closed via `logger.close()` or the process
|
|
38
|
+
* receives a shutdown signal (when `gracefulShutdown` is enabled).
|
|
39
|
+
* Errors thrown inside `onShutdown` are silently swallowed.
|
|
40
|
+
*/
|
|
41
|
+
onShutdown?(): void | Promise<void>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Holds an ordered list of `LogixiaPlugin` instances and dispatches lifecycle
|
|
45
|
+
* events to them. One registry is created per logger instance; a global
|
|
46
|
+
* singleton is also exported for process-wide registration.
|
|
47
|
+
*/
|
|
48
|
+
declare class PluginRegistry {
|
|
49
|
+
private readonly _plugins;
|
|
50
|
+
/**
|
|
51
|
+
* Register a plugin. Silently skips if a plugin with the same `name` is
|
|
52
|
+
* already registered on this registry.
|
|
53
|
+
*/
|
|
54
|
+
register(plugin: LogixiaPlugin): void;
|
|
55
|
+
/** Remove a previously registered plugin by name. No-op if not found. */
|
|
56
|
+
unregister(name: string): void;
|
|
57
|
+
/** Returns `true` if a plugin with the given name is registered. */
|
|
58
|
+
has(name: string): boolean;
|
|
59
|
+
/** Number of currently registered plugins. */
|
|
60
|
+
get size(): number;
|
|
61
|
+
/**
|
|
62
|
+
* Run all `onLog` hooks in order.
|
|
63
|
+
* Returns `null` if any plugin cancels the entry; otherwise returns the
|
|
64
|
+
* (possibly transformed) entry.
|
|
65
|
+
*/
|
|
66
|
+
runOnLog(entry: LogEntry): Promise<LogEntry | null>;
|
|
67
|
+
/**
|
|
68
|
+
* Notify all `onError` hooks.
|
|
69
|
+
* Errors thrown inside hooks are swallowed to prevent error cascades.
|
|
70
|
+
*/
|
|
71
|
+
runOnError(error: Error, entry?: LogEntry): Promise<void>;
|
|
72
|
+
/** Run all `onShutdown` hooks concurrently. Hook errors are swallowed. */
|
|
73
|
+
runOnShutdown(): Promise<void>;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Module-level singleton registry.
|
|
77
|
+
*
|
|
78
|
+
* Plugins registered here are automatically copied into every **new** logger
|
|
79
|
+
* instance created after the registration. Already-created loggers are not
|
|
80
|
+
* retroactively affected — use `logger.use(plugin)` for per-instance control.
|
|
81
|
+
*/
|
|
82
|
+
declare const globalPluginRegistry: PluginRegistry;
|
|
83
|
+
/**
|
|
84
|
+
* Register a plugin in the global registry so it applies to every future
|
|
85
|
+
* logger instance.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts
|
|
89
|
+
* import { usePlugin } from 'logixia';
|
|
90
|
+
*
|
|
91
|
+
* usePlugin({
|
|
92
|
+
* name: 'audit-sink',
|
|
93
|
+
* onLog(entry) {
|
|
94
|
+
* if (entry.level === 'error') auditQueue.push(entry);
|
|
95
|
+
* return entry;
|
|
96
|
+
* },
|
|
97
|
+
* });
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
declare function usePlugin(plugin: LogixiaPlugin): void;
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/core/logitron-logger.d.ts
|
|
103
|
+
declare class LogixiaLogger<TConfig extends LoggerConfig<Record<string, number>> = LoggerConfig> implements ILoggerDefault {
|
|
104
|
+
[K: string]: any;
|
|
105
|
+
private config;
|
|
106
|
+
private context?;
|
|
107
|
+
private timers;
|
|
108
|
+
private contextData;
|
|
109
|
+
private transportManager;
|
|
110
|
+
private fieldState;
|
|
111
|
+
/** Stable fallback trace ID generated ONCE per logger instance. */
|
|
112
|
+
private readonly fallbackTraceId;
|
|
113
|
+
/** Numeric value for each known log level — built once, read on every log call. */
|
|
114
|
+
private _levelValues;
|
|
115
|
+
/** Numeric threshold for the currently active log level. */
|
|
116
|
+
private _minLevelValue;
|
|
117
|
+
/** `source=value` pairs already reported as unknown levels — warn once per logger. */
|
|
118
|
+
private readonly _warnedInvalidLevels;
|
|
119
|
+
/** Pre-built ANSI color codes to avoid recreating the object in colorize(). */
|
|
120
|
+
private _colorMap;
|
|
121
|
+
/** Pre-computed field-enabled booleans so isFieldEnabled() isn't called per log. */
|
|
122
|
+
private _fieldCache;
|
|
123
|
+
/** True when contextData is non-empty — avoids Object.keys() check on hot path. */
|
|
124
|
+
private _hasContextData;
|
|
125
|
+
/**
|
|
126
|
+
* Pre-computed `[INFO] `, `[WARN] ` etc. strings — avoids a colorize() call per log.
|
|
127
|
+
* Key: lowercase level name. Value: formatted bracket string ready to concatenate.
|
|
128
|
+
*/
|
|
129
|
+
private _formattedLevels;
|
|
130
|
+
/** Pre-computed `[appName] ` string — avoids template literal allocation per log. */
|
|
131
|
+
private _formattedAppName;
|
|
132
|
+
/** True when a redact config is present — short-circuits applyRedaction when false. */
|
|
133
|
+
private _hasRedact;
|
|
134
|
+
/** Sampling engine — only created when sampling config is present. */
|
|
135
|
+
private _sampler;
|
|
136
|
+
/** Per-instance plugin registry — also inherits from the global registry at creation time. */
|
|
137
|
+
private readonly _pluginRegistry;
|
|
138
|
+
/** Set on loggers created by child(); they borrow the root's transports, sampler and plugins. */
|
|
139
|
+
private readonly _parent;
|
|
140
|
+
constructor(config: TConfig, context?: string, parent?: LogixiaLogger<TConfig>);
|
|
141
|
+
private setupGracefulShutdown;
|
|
142
|
+
private createCustomLevelMethods;
|
|
143
|
+
/**
|
|
144
|
+
* Rebuild all hot-path caches after any config mutation or level change.
|
|
145
|
+
* Keeps the actual log() call free of allocations in the common case.
|
|
146
|
+
*/
|
|
147
|
+
private _buildPerfCaches;
|
|
148
|
+
error(messageOrError: string | Error, data?: Record<string, unknown>): Promise<void>;
|
|
149
|
+
warn(message: string, data?: Record<string, unknown>): Promise<void>;
|
|
150
|
+
info(message: string, data?: Record<string, unknown>): Promise<void>;
|
|
151
|
+
debug(message: string, data?: Record<string, unknown>): Promise<void>;
|
|
152
|
+
trace(message: string, data?: Record<string, unknown>): Promise<void>;
|
|
153
|
+
verbose(message: string, data?: Record<string, unknown>): Promise<void>;
|
|
154
|
+
logLevel(level: string, message: string, data?: Record<string, unknown>): Promise<void>;
|
|
155
|
+
time(label: string): void;
|
|
156
|
+
timeEnd(label: string): Promise<number | undefined>;
|
|
157
|
+
timeAsync<T>(label: string, fn: () => Promise<T>): Promise<T>;
|
|
158
|
+
setLevel(level: LogLevelString): void;
|
|
159
|
+
getLevel(): LogLevelString;
|
|
160
|
+
private _validLevelList;
|
|
161
|
+
/**
|
|
162
|
+
* Canonicalise a level from config/ENV. Unknown values return undefined so the
|
|
163
|
+
* caller falls through to the next source, and warn once per logger per source.
|
|
164
|
+
*/
|
|
165
|
+
private _validLevel;
|
|
166
|
+
/**
|
|
167
|
+
* Replace the per-namespace level map at runtime — no restart needed.
|
|
168
|
+
*
|
|
169
|
+
* This is the runtime counterpart to the `namespaceLevels` config option and
|
|
170
|
+
* the most-requested logging feature across the Winston/Pino issue trackers
|
|
171
|
+
* (flip a module's verbosity live to chase a bug without raising global
|
|
172
|
+
* volume). The new map fully replaces the previous one.
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```ts
|
|
176
|
+
* // Turn on debug for the DB layer only, live:
|
|
177
|
+
* logger.setNamespaceLevels({ 'db.*': 'debug', '*': 'info' });
|
|
178
|
+
* ```
|
|
179
|
+
*/
|
|
180
|
+
setNamespaceLevels(levels: NamespaceLevels): void;
|
|
181
|
+
/** Merge entries into the existing per-namespace level map at runtime. */
|
|
182
|
+
patchNamespaceLevels(levels: NamespaceLevels): void;
|
|
183
|
+
/** Return a copy of the current per-namespace level map. */
|
|
184
|
+
getNamespaceLevels(): NamespaceLevels;
|
|
185
|
+
setContext(context: string): void;
|
|
186
|
+
getContext(): string | undefined;
|
|
187
|
+
enableField(fieldName: string): void;
|
|
188
|
+
disableField(fieldName: string): void;
|
|
189
|
+
isFieldEnabled(fieldName: string): boolean;
|
|
190
|
+
getFieldState(): Record<string, boolean>;
|
|
191
|
+
resetFieldState(): void;
|
|
192
|
+
/** @deprecated No-op. Library code never prompts on stdin; use setTransportLevels(). */
|
|
193
|
+
enableTransportLevelPrompting(): void;
|
|
194
|
+
/** @deprecated No-op. */
|
|
195
|
+
disableTransportLevelPrompting(): void;
|
|
196
|
+
setTransportLevels(transportId: string, levels: string[]): void;
|
|
197
|
+
getTransportLevels(transportId: string): string[] | undefined;
|
|
198
|
+
clearTransportLevelPreferences(): void;
|
|
199
|
+
getAvailableTransports(): string[];
|
|
200
|
+
child(context: string, data?: Record<string, unknown>): ILogger;
|
|
201
|
+
/**
|
|
202
|
+
* Register a plugin on this logger instance.
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* ```ts
|
|
206
|
+
* logger.use({
|
|
207
|
+
* name: 'audit',
|
|
208
|
+
* onLog(entry) { auditQueue.push(entry); return entry; },
|
|
209
|
+
* });
|
|
210
|
+
* ```
|
|
211
|
+
*/
|
|
212
|
+
use(plugin: LogixiaPlugin): this;
|
|
213
|
+
/**
|
|
214
|
+
* Remove a previously registered plugin by name.
|
|
215
|
+
* No-op if the plugin is not registered on this instance.
|
|
216
|
+
*/
|
|
217
|
+
unuse(pluginName: string): this;
|
|
218
|
+
flush(): Promise<void>;
|
|
219
|
+
healthCheck(): Promise<{
|
|
220
|
+
healthy: boolean;
|
|
221
|
+
details: Record<string, unknown>;
|
|
222
|
+
}>;
|
|
223
|
+
close(): Promise<void>;
|
|
224
|
+
private log;
|
|
225
|
+
/**
|
|
226
|
+
* Hot-path level check: a single Map lookup + integer compare.
|
|
227
|
+
* The level map and threshold are pre-built in _buildPerfCaches().
|
|
228
|
+
*/
|
|
229
|
+
private shouldLog;
|
|
230
|
+
/**
|
|
231
|
+
* Feature 3: Resolve the effective log level for this logger instance.
|
|
232
|
+
*
|
|
233
|
+
* Priority:
|
|
234
|
+
* 1. ENV `LOGIXIA_LEVEL_<NS_UPPER>` (e.g. LOGIXIA_LEVEL_DB for ns "db" or "db.queries")
|
|
235
|
+
* 2. Matching `namespaceLevels` config entry (longer pattern = more specific, wins)
|
|
236
|
+
* 3. Global `LOGIXIA_LEVEL` ENV override
|
|
237
|
+
* 4. `levelOptions.level` (resolved via Feature 5 in constructor)
|
|
238
|
+
*/
|
|
239
|
+
private resolveEffectiveLevel;
|
|
240
|
+
private formatLog;
|
|
241
|
+
private colorize;
|
|
242
|
+
/**
|
|
243
|
+
* Dispatch the entry to transports (each formats itself). Returns `void` when
|
|
244
|
+
* the write completes synchronously (console-only hot path) and a Promise only
|
|
245
|
+
* when a transport is genuinely async — so the caller awaits only when needed.
|
|
246
|
+
* Formatting for the no-transport fallback is done lazily, never on the
|
|
247
|
+
* transport path.
|
|
248
|
+
*/
|
|
249
|
+
private output;
|
|
250
|
+
/** Shared transport-failure handler: log internally, notify plugins, then fall
|
|
251
|
+
* back to a direct stdout/stderr write so the entry is never lost. */
|
|
252
|
+
private _handleOutputError;
|
|
253
|
+
}
|
|
254
|
+
declare function createLogger<T extends LoggerConfig<Record<string, number>>>(config: T, context?: string): LoggerWithLevels<T>;
|
|
255
|
+
//#endregion
|
|
256
|
+
export { globalPluginRegistry as a, PluginRegistry as i, createLogger as n, usePlugin as o, LogixiaPlugin as r, LogixiaLogger as t };
|
|
257
|
+
//# sourceMappingURL=logitron-logger-UVeN-mQm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logitron-logger-UVeN-mQm.d.ts","names":[],"sources":["../src/plugin.ts","../src/core/logitron-logger.ts"],"sourcesContent":[],"mappings":";;;;AC2K+B,UDzId,aAAA,CCyIc;EAAb;;;;;EA4SqB,IAAA,EAAA,MAAA;EAAc;;;;;EAeU,MAAA,GAAA,EAAA,IAAA,GDvb3C,OCub2C,CAAA,IAAA,CAAA;EAIzB;;;;;;;;;;;EAyC6B,KAAA,EAAA,KAAA,EDvdnD,QCudmD,CAAA,EDvdxC,QCudwC,GAAA,IAAA,GDvdtB,OCudsB,CDvdd,QCudc,GAAA,IAAA,CAAA;EAAR;;;;;EAwFnC,OAAA,EAAA,KAAA,EDxiBN,KCwiBM,EAAA,KAAA,CAAA,EDxiBS,QCwiBT,CAAA,EAAA,IAAA,GDxiB2B,OCwiB3B,CAAA,IAAA,CAAA;EAsCL;;;;;EAyGyC,UAAA,GAAA,EAAA,IAAA,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