logixia 2.0.8 → 2.0.9
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 +1 -1
- package/dist/{builder-DKL7WcIN.mjs → builder-BlIJNIuk.mjs} +158 -80
- package/dist/builder-BlIJNIuk.mjs.map +1 -0
- package/dist/{builder-BTzvPGHN.js → builder-Bs0qkfkY.js} +158 -81
- package/dist/builder-Bs0qkfkY.js.map +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{logitron-logger-Qh3y9-WH.d.ts → logitron-logger-DVUdgmBY.d.ts} +20 -1
- package/dist/logitron-logger-DVUdgmBY.d.ts.map +1 -0
- package/dist/{logitron-logger-sYuk8fOb.d.mts → logitron-logger-DoWmMjYB.d.mts} +20 -1
- package/dist/logitron-logger-DoWmMjYB.d.mts.map +1 -0
- package/dist/nest.d.mts +1 -1
- package/dist/nest.d.ts +1 -1
- package/dist/nest.js +1 -1
- package/dist/nest.mjs +1 -1
- package/package.json +1 -2
- package/dist/builder-BTzvPGHN.js.map +0 -1
- package/dist/builder-DKL7WcIN.mjs.map +0 -1
- package/dist/logitron-logger-Qh3y9-WH.d.ts.map +0 -1
- package/dist/logitron-logger-sYuk8fOb.d.mts.map +0 -1
|
@@ -43,6 +43,16 @@ declare class LogixiaLogger<TConfig extends LoggerConfig<Record<string, number>>
|
|
|
43
43
|
private _formattedLevels;
|
|
44
44
|
/** Pre-computed `[appName] ` string — avoids template literal allocation per log. */
|
|
45
45
|
private _formattedAppName;
|
|
46
|
+
/**
|
|
47
|
+
* JSON line pieces between the timestamp and the message, keyed by level, for the
|
|
48
|
+
* appName and environment they were built from. Rebuilt when either changes.
|
|
49
|
+
*/
|
|
50
|
+
private _jsonHeads;
|
|
51
|
+
private _jsonHeadsApp;
|
|
52
|
+
private _jsonHeadsEnv;
|
|
53
|
+
/** The `,"context":"..."` piece for `_jsonContextKey`. */
|
|
54
|
+
private _jsonContextKey;
|
|
55
|
+
private _jsonContext;
|
|
46
56
|
/** True when a redact config is present — short-circuits applyRedaction when false. */
|
|
47
57
|
private _hasRedact;
|
|
48
58
|
/** Sampling engine — only created when sampling config is present. */
|
|
@@ -85,6 +95,8 @@ declare class LogixiaLogger<TConfig extends LoggerConfig<Record<string, number>>
|
|
|
85
95
|
* in `levelOptions.levels` (and are not built-in).
|
|
86
96
|
*/
|
|
87
97
|
logLevel(level: string, message: string, data?: Record<string, unknown>): Promise<void>;
|
|
98
|
+
private _run;
|
|
99
|
+
private _settle;
|
|
88
100
|
/** Start a named timer; finish it with {@link timeEnd}. Reusing a label restarts it. */
|
|
89
101
|
time(label: string): void;
|
|
90
102
|
/**
|
|
@@ -226,7 +238,9 @@ declare class LogixiaLogger<TConfig extends LoggerConfig<Record<string, number>>
|
|
|
226
238
|
* ```
|
|
227
239
|
*/
|
|
228
240
|
close(): Promise<void>;
|
|
241
|
+
/** Returns a Promise only when a plugin or a transport is asynchronous. */
|
|
229
242
|
private log;
|
|
243
|
+
private _logThroughPlugins;
|
|
230
244
|
/**
|
|
231
245
|
* Hot-path level check: a single Map lookup + integer compare.
|
|
232
246
|
* The level map and threshold are pre-built in _buildPerfCaches().
|
|
@@ -244,6 +258,11 @@ declare class LogixiaLogger<TConfig extends LoggerConfig<Record<string, number>>
|
|
|
244
258
|
*/
|
|
245
259
|
private resolveEffectiveLevel;
|
|
246
260
|
private formatLog;
|
|
261
|
+
/**
|
|
262
|
+
* The same bytes JSON.stringify(entry) gives for an entry log() built, without
|
|
263
|
+
* walking the fixed fields. Returns undefined when a field has an unexpected type.
|
|
264
|
+
*/
|
|
265
|
+
private _buildJsonLine;
|
|
247
266
|
private colorize;
|
|
248
267
|
/**
|
|
249
268
|
* Dispatch the entry to transports (each formats itself). Returns `void` when
|
|
@@ -275,4 +294,4 @@ declare class LogixiaLogger<TConfig extends LoggerConfig<Record<string, number>>
|
|
|
275
294
|
*/
|
|
276
295
|
declare function createLogger<T extends LoggerConfig<Record<string, number>>>(config: T, context?: string): LoggerWithLevels<T>;
|
|
277
296
|
export { createLogger as n, LogixiaLogger as t };
|
|
278
|
-
//# sourceMappingURL=logitron-logger-
|
|
297
|
+
//# sourceMappingURL=logitron-logger-DVUdgmBY.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logitron-logger-DVUdgmBY.d.ts","names":[],"sources":["../src/core/logitron-logger.ts"],"mappings":";;;;;;;;;;;;;;cAmNa,cACX,gBAAgB,aAAa,0BAA0B,yBAC5C;GAEV;UAEO;UACA;UACA;UACA;UACA;UACA;;mBAGS;;UAIT;;UAEA;;UAEA;;mBAES;;UAET;;UAEA;;UAEA;;;;;UAKA;;UAEA;;;;;UAKA;UACA;UACA;;UAEA;UACA;;UAEA;;UAEA;;mBAES;;mBAEA;;mBAEA;;UAET;EAEI,YAAA,QAAQ,SAAS,kBAAkB,SAAS,cAAc;UA4G9D;UAiBA;;;;;UAoBA;;;;;;EA2HR,MAAM,yBAAyB,OAAO,OAAO,0BAA0B;;EAcvE,KAAK,iBAAiB,OAAO,0BAA0B;;EAKvD,KAAK,iBAAiB,OAAO,0BAA0B;;EAKvD,MAAM,iBAAiB,OAAO,0BAA0B;;EAKxD,MAAM,iBAAiB,OAAO,0BAA0B;;EAKxD,QAAQ,iBAAiB,OAAO,0BAA0B;;;;;;EAS1D,SAAS,eAAe,iBAAiB,OAAO,0BAA0B;UAMlE;UAQA;;EAOR,KAAK;;;;;;;;;;;;;EAgBC,QAAQ,gBAAgB;EAmBxB,UAAU,GAAG,eAAe,UAAU,QAAQ,KAAK,QAAQ;;;;;;;;;;;;EAyBjE,SAAS,OAAO;;;;;;EAuBhB,YAAY;UAIJ;;;;;UAQA;;;;;;;;;;;;;;;;;;;EAkCR,mBAAmB,QAAQ;;EAS3B,qBAAqB,QAAQ;;EAO7B,sBAAsB;UAId;;EAMR,WAAW;;EAKX;;EAOA,YAAY;;EASZ,aAAa;;EASb,eAAe;;EASf,iBAAiB;;EAmBjB;;EAQA;;EAMA;;EAMA,mBAAmB,qBAAqB;;EAMxC,mBAAmB;EAMnB;;EAMA;;;;;;;;;;;;;EAkBA,MAAM,iBAAiB,OAAO,0BAA0B;;;;;;;;;;;;EA0BxD,IAAI,QAAQ;;;;;EASZ,MAAM;;EAQA,SAAS;;EAKT,eAAe;IAAU;IAAkB,SAAS;;;;;;;;;;;;;;;;EAqBpD,SAAS;;UAuBP;UAqHM;;;;;UAYN;;;;;;;;;;;UAgBA;UAwCA;;;;;UAkEA;UAiDA;;;;;;;;UAcA;;;UAuBM;;;;;;;;;;;;;;;;;;iBA+BA,aAAa,UAAU,aAAa,yBAClD,QAAQ,GACR,mBACC,iBAAiB"}
|
|
@@ -43,6 +43,16 @@ declare class LogixiaLogger<TConfig extends LoggerConfig<Record<string, number>>
|
|
|
43
43
|
private _formattedLevels;
|
|
44
44
|
/** Pre-computed `[appName] ` string — avoids template literal allocation per log. */
|
|
45
45
|
private _formattedAppName;
|
|
46
|
+
/**
|
|
47
|
+
* JSON line pieces between the timestamp and the message, keyed by level, for the
|
|
48
|
+
* appName and environment they were built from. Rebuilt when either changes.
|
|
49
|
+
*/
|
|
50
|
+
private _jsonHeads;
|
|
51
|
+
private _jsonHeadsApp;
|
|
52
|
+
private _jsonHeadsEnv;
|
|
53
|
+
/** The `,"context":"..."` piece for `_jsonContextKey`. */
|
|
54
|
+
private _jsonContextKey;
|
|
55
|
+
private _jsonContext;
|
|
46
56
|
/** True when a redact config is present — short-circuits applyRedaction when false. */
|
|
47
57
|
private _hasRedact;
|
|
48
58
|
/** Sampling engine — only created when sampling config is present. */
|
|
@@ -85,6 +95,8 @@ declare class LogixiaLogger<TConfig extends LoggerConfig<Record<string, number>>
|
|
|
85
95
|
* in `levelOptions.levels` (and are not built-in).
|
|
86
96
|
*/
|
|
87
97
|
logLevel(level: string, message: string, data?: Record<string, unknown>): Promise<void>;
|
|
98
|
+
private _run;
|
|
99
|
+
private _settle;
|
|
88
100
|
/** Start a named timer; finish it with {@link timeEnd}. Reusing a label restarts it. */
|
|
89
101
|
time(label: string): void;
|
|
90
102
|
/**
|
|
@@ -226,7 +238,9 @@ declare class LogixiaLogger<TConfig extends LoggerConfig<Record<string, number>>
|
|
|
226
238
|
* ```
|
|
227
239
|
*/
|
|
228
240
|
close(): Promise<void>;
|
|
241
|
+
/** Returns a Promise only when a plugin or a transport is asynchronous. */
|
|
229
242
|
private log;
|
|
243
|
+
private _logThroughPlugins;
|
|
230
244
|
/**
|
|
231
245
|
* Hot-path level check: a single Map lookup + integer compare.
|
|
232
246
|
* The level map and threshold are pre-built in _buildPerfCaches().
|
|
@@ -244,6 +258,11 @@ declare class LogixiaLogger<TConfig extends LoggerConfig<Record<string, number>>
|
|
|
244
258
|
*/
|
|
245
259
|
private resolveEffectiveLevel;
|
|
246
260
|
private formatLog;
|
|
261
|
+
/**
|
|
262
|
+
* The same bytes JSON.stringify(entry) gives for an entry log() built, without
|
|
263
|
+
* walking the fixed fields. Returns undefined when a field has an unexpected type.
|
|
264
|
+
*/
|
|
265
|
+
private _buildJsonLine;
|
|
247
266
|
private colorize;
|
|
248
267
|
/**
|
|
249
268
|
* Dispatch the entry to transports (each formats itself). Returns `void` when
|
|
@@ -275,4 +294,4 @@ declare class LogixiaLogger<TConfig extends LoggerConfig<Record<string, number>>
|
|
|
275
294
|
*/
|
|
276
295
|
declare function createLogger<T extends LoggerConfig<Record<string, number>>>(config: T, context?: string): LoggerWithLevels<T>;
|
|
277
296
|
export { createLogger as n, LogixiaLogger as t };
|
|
278
|
-
//# sourceMappingURL=logitron-logger-
|
|
297
|
+
//# sourceMappingURL=logitron-logger-DoWmMjYB.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logitron-logger-DoWmMjYB.d.mts","names":[],"sources":["../src/core/logitron-logger.ts"],"mappings":";;;;;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;UAYN;;;;;;;;;;;UAgBA;UAwCA;;;;;UAkEA;UAiDA;;;;;;;;UAcA;;;UAuBM;;;;;;;;;;;;;;;;;;iBA+BA,aAAa,UAAU,aAAa,yBAClD,QAAQ,GACR,mBACC,iBAAiB"}
|
package/dist/nest.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as TraceIdConfig, b as LoggerConfig, y as LogLevelString } from "./index-BAkPHp5D.mjs";
|
|
2
|
-
import { t as LogixiaLogger } from "./logitron-logger-
|
|
2
|
+
import { t as LogixiaLogger } from "./logitron-logger-DoWmMjYB.mjs";
|
|
3
3
|
import { ArgumentsHost, CallHandler, ExceptionFilter, ExecutionContext, InjectionToken, LoggerService, MiddlewareConsumer, ModuleMetadata, NestInterceptor, NestMiddleware, NestModule, OptionalFactoryDependency, Type } from "@nestjs/common";
|
|
4
4
|
import { Observable } from "rxjs";
|
|
5
5
|
import { NextFunction, Request, Response } from "express";
|
package/dist/nest.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as TraceIdConfig, b as LoggerConfig, y as LogLevelString } from "./index-e7LowmAu.js";
|
|
2
|
-
import { t as LogixiaLogger } from "./logitron-logger-
|
|
2
|
+
import { t as LogixiaLogger } from "./logitron-logger-DVUdgmBY.js";
|
|
3
3
|
import { ArgumentsHost, CallHandler, ExceptionFilter, ExecutionContext, InjectionToken, LoggerService, MiddlewareConsumer, ModuleMetadata, NestInterceptor, NestMiddleware, NestModule, OptionalFactoryDependency, Type } from "@nestjs/common";
|
|
4
4
|
import { Observable } from "rxjs";
|
|
5
5
|
import { NextFunction, Request, Response } from "express";
|
package/dist/nest.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_secret_config = require("./secret-config-BvFl2dC8.js");
|
|
3
|
-
const require_builder = require("./builder-
|
|
3
|
+
const require_builder = require("./builder-Bs0qkfkY.js");
|
|
4
4
|
const require_sensitive_names = require("./sensitive-names-CHMowujD.js");
|
|
5
5
|
const require_request_trace = require("./request-trace-ByujsUZk.js");
|
|
6
6
|
const require_internal_log = require("./internal-log-DwqTjhpb.js");
|
package/dist/nest.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as DEFAULT_CONFIG, T as LogLevel, _ as serializeError, a as isLogixiaException, o as LogixiaLogger, t as ErrorResponseBuilder } from "./builder-
|
|
1
|
+
import { S as DEFAULT_CONFIG, T as LogLevel, _ as serializeError, a as isLogixiaException, o as LogixiaLogger, t as ErrorResponseBuilder } from "./builder-BlIJNIuk.mjs";
|
|
2
2
|
import { a as buildNameSet, c as sensitiveQueryValues, l as assignOwn, n as DEFAULT_REDACT_QUERY_PARAMS, o as redactUrlQuery, s as sanitizeText } from "./sensitive-names-o__1PUUR.mjs";
|
|
3
3
|
import { d as getTraceContextKey, l as extractTraceId, o as TraceContext, p as sanitizeIncomingId, r as DEFAULT_TRACE_HEADERS } from "./request-trace-BgNykH9M.mjs";
|
|
4
4
|
import { n as protectSecrets } from "./secret-config-ByGq7kJd.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "logixia",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"description": "Async-first TypeScript logger for Node, NestJS and the edge: request tracing, redaction, OpenTelemetry/OTLP export, file/database/cloud transports, sampling and log search. Winston/Pino alternative.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -336,7 +336,6 @@
|
|
|
336
336
|
},
|
|
337
337
|
"dependencies": {
|
|
338
338
|
"commander": "^11.1.0",
|
|
339
|
-
"fast-json-stringify": "^7.0.1",
|
|
340
339
|
"picocolors": "^1.1.1"
|
|
341
340
|
},
|
|
342
341
|
"overrides": {
|