logixia 1.7.2 → 1.8.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/dist/.tsbuildinfo +1 -1
- 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 +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/dist/{logitron-logger.module-BBpNdnfz.d.ts → logitron-logger.module-Dh0GtJW3.d.ts} +22 -1
- package/dist/{logitron-logger.module-BBpNdnfz.d.ts.map → logitron-logger.module-Dh0GtJW3.d.ts.map} +1 -1
- package/dist/{logitron-logger.module-B5vX8isR.d.mts → logitron-logger.module-Dq-HiKOm.d.mts} +22 -1
- package/dist/{logitron-logger.module-B5vX8isR.d.mts.map → logitron-logger.module-Dq-HiKOm.d.mts.map} +1 -1
- package/dist/{logitron-logger.module-BI5eI4X9.js → logitron-logger.module-EX78H9nm.js} +29 -3
- package/dist/{logitron-logger.module-BI5eI4X9.js.map → logitron-logger.module-EX78H9nm.js.map} +1 -1
- package/dist/{logitron-logger.module-BvWgddzf.mjs → logitron-logger.module-kQTARPqg.mjs} +29 -3
- package/dist/{logitron-logger.module-BvWgddzf.mjs.map → logitron-logger.module-kQTARPqg.mjs.map} +1 -1
- 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 -1
|
@@ -10775,6 +10775,28 @@ let LogixiaLoggerModule = class LogixiaLoggerModule$1 {
|
|
|
10775
10775
|
this.config = {};
|
|
10776
10776
|
}
|
|
10777
10777
|
static #_ = this.loggerConfig = {};
|
|
10778
|
+
static #_2 = this._globalLogger = null;
|
|
10779
|
+
/**
|
|
10780
|
+
* Returns the global LogixiaLoggerService instance that was created when the
|
|
10781
|
+
* module booted. Useful for logging outside of NestJS DI — utility functions,
|
|
10782
|
+
* plain scripts, decorators — without injecting the service everywhere.
|
|
10783
|
+
*
|
|
10784
|
+
* Returns `null` if called before `LogixiaLoggerModule.forRoot[Async]()` has
|
|
10785
|
+
* been initialised (i.e. before the NestJS app has started).
|
|
10786
|
+
*
|
|
10787
|
+
* @example
|
|
10788
|
+
* ```ts
|
|
10789
|
+
* // some-util.ts
|
|
10790
|
+
* import { LogixiaLoggerModule } from 'logixia/nest';
|
|
10791
|
+
*
|
|
10792
|
+
* export function doSomething() {
|
|
10793
|
+
* LogixiaLoggerModule.getGlobalLogger()?.info('doing something');
|
|
10794
|
+
* }
|
|
10795
|
+
* ```
|
|
10796
|
+
*/
|
|
10797
|
+
static getGlobalLogger() {
|
|
10798
|
+
return _LogixiaLoggerModule._globalLogger;
|
|
10799
|
+
}
|
|
10778
10800
|
configure(consumer) {
|
|
10779
10801
|
const { forRoutes = DEFAULT_ROUTES, exclude } = this.config;
|
|
10780
10802
|
const middlewareConfig = (req, res, next) => {
|
|
@@ -10811,7 +10833,7 @@ let LogixiaLoggerModule = class LogixiaLoggerModule$1 {
|
|
|
10811
10833
|
{
|
|
10812
10834
|
provide: LogixiaLoggerService,
|
|
10813
10835
|
useFactory: (loggerConfig) => {
|
|
10814
|
-
|
|
10836
|
+
const service = new LogixiaLoggerService({
|
|
10815
10837
|
level: "info",
|
|
10816
10838
|
service: "NestJSApp",
|
|
10817
10839
|
environment: "development",
|
|
@@ -10837,6 +10859,8 @@ let LogixiaLoggerModule = class LogixiaLoggerModule$1 {
|
|
|
10837
10859
|
},
|
|
10838
10860
|
...loggerConfig
|
|
10839
10861
|
});
|
|
10862
|
+
_LogixiaLoggerModule._globalLogger = service;
|
|
10863
|
+
return service;
|
|
10840
10864
|
},
|
|
10841
10865
|
inject: [LOGIXIA_LOGGER_CONFIG]
|
|
10842
10866
|
},
|
|
@@ -10906,7 +10930,9 @@ let LogixiaLoggerModule = class LogixiaLoggerModule$1 {
|
|
|
10906
10930
|
...loggerConfig
|
|
10907
10931
|
};
|
|
10908
10932
|
_LogixiaLoggerModule.loggerConfig = defaultConfig;
|
|
10909
|
-
|
|
10933
|
+
const service = new LogixiaLoggerService(defaultConfig);
|
|
10934
|
+
_LogixiaLoggerModule._globalLogger = service;
|
|
10935
|
+
return service;
|
|
10910
10936
|
},
|
|
10911
10937
|
inject: [LOGIXIA_LOGGER_CONFIG]
|
|
10912
10938
|
},
|
|
@@ -10971,4 +10997,4 @@ LogixiaLoggerModule = _LogixiaLoggerModule = __decorate([Module({})], LogixiaLog
|
|
|
10971
10997
|
|
|
10972
10998
|
//#endregion
|
|
10973
10999
|
export { redactObject as A, LogLevel as B, setTraceId as C, registerForShutdown as D, flushOnExit as E, isError as F, createExpressContextMiddleware as G, globalPluginRegistry as H, normalizeError as I, createFastifyContextHook as K, serializeError as L, getActiveOtelContext as M, getOtelMetaFields as N, resetShutdownHandlers as O, initOtelBridge as P, DEFAULT_LOG_COLORS as R, runWithTraceId as S, deregisterFromShutdown as T, usePlugin as U, PluginRegistry as V, LogixiaContext as W, createTraceMiddleware as _, TraceMiddleware as a, getCurrentTraceId as b, LogixiaLoggerService as c, LogixiaLogger as d, createLogger as f, _setActiveContextKey as g, TraceContext as h, WebSocketTraceInterceptor as i, disableOtelBridge as j, applyRedaction as k, __decorate as l, TRACE_CONTEXT_KEY as m, LOGIXIA_LOGGER_PREFIX as n, __decorateParam as o, DEFAULT_TRACE_HEADERS as p, LogixiaLoggerModule as r, KafkaTraceInterceptor as s, LOGIXIA_LOGGER_CONFIG as t, __decorateMetadata as u, extractTraceId as v, traceStorage as w, getTraceContextKey as x, generateTraceId as y, DEFAULT_LOG_LEVELS as z };
|
|
10974
|
-
//# sourceMappingURL=logitron-logger.module-
|
|
11000
|
+
//# sourceMappingURL=logitron-logger.module-kQTARPqg.mjs.map
|