@lark-apaas/nestjs-logger 1.0.2-alpha.1 → 1.0.2-alpha.11
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.cjs +81 -109
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -19
- package/dist/index.d.ts +3 -19
- package/dist/index.js +69 -98
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -452,7 +452,7 @@ var require_config_constants = __commonJS({
|
|
|
452
452
|
value: true
|
|
453
453
|
});
|
|
454
454
|
exports2.AS_PROVIDER_METHOD_KEY = exports2.VALIDATED_ENV_PROPNAME = exports2.PARTIAL_CONFIGURATION_PROPNAME = exports2.PARTIAL_CONFIGURATION_KEY = exports2.VALIDATED_ENV_LOADER = exports2.CONFIGURATION_LOADER = exports2.CONFIGURATION_TOKEN = exports2.CONFIGURATION_SERVICE_TOKEN = void 0;
|
|
455
|
-
exports2.CONFIGURATION_SERVICE_TOKEN =
|
|
455
|
+
exports2.CONFIGURATION_SERVICE_TOKEN = Symbol("CONFIG_SERVICE");
|
|
456
456
|
exports2.CONFIGURATION_TOKEN = "CONFIGURATION_TOKEN";
|
|
457
457
|
exports2.CONFIGURATION_LOADER = "CONFIGURATION_LOADER";
|
|
458
458
|
exports2.VALIDATED_ENV_LOADER = "VALIDATED_ENV_LOADER";
|
|
@@ -14376,22 +14376,22 @@ __export(index_exports, {
|
|
|
14376
14376
|
LoggerContextMiddleware: () => LoggerContextMiddleware,
|
|
14377
14377
|
LoggerModule: () => LoggerModule,
|
|
14378
14378
|
PinoLoggerService: () => PinoLoggerService,
|
|
14379
|
+
RequestContextService: () => import_nestjs_common5.RequestContextService,
|
|
14379
14380
|
TRACE_LOGGER: () => TRACE_LOGGER
|
|
14380
14381
|
});
|
|
14381
14382
|
module.exports = __toCommonJS(index_exports);
|
|
14382
14383
|
|
|
14383
14384
|
// src/service/app-logger.service.ts
|
|
14384
|
-
var
|
|
14385
|
-
var
|
|
14386
|
-
var import_observable = require("@lark-apaas/observable");
|
|
14385
|
+
var import_common = require("@nestjs/common");
|
|
14386
|
+
var import_nestjs_observable = require("@lark-apaas/nestjs-observable");
|
|
14387
14387
|
|
|
14388
14388
|
// src/helper/constants.ts
|
|
14389
|
-
var PINO_ROOT_LOGGER =
|
|
14390
|
-
var TRACE_LOGGER =
|
|
14389
|
+
var PINO_ROOT_LOGGER = Symbol("PINO_ROOT_LOGGER");
|
|
14390
|
+
var TRACE_LOGGER = Symbol("TRACE_LOGGER");
|
|
14391
|
+
var METRICS_LOGGER = Symbol("METRICS_LOGGER");
|
|
14391
14392
|
|
|
14392
|
-
// src/service/
|
|
14393
|
-
var
|
|
14394
|
-
var import_async_hooks = require("async_hooks");
|
|
14393
|
+
// src/service/app-logger.service.ts
|
|
14394
|
+
var import_nestjs_common = require("@lark-apaas/nestjs-common");
|
|
14395
14395
|
function _ts_decorate(decorators, target, key, desc) {
|
|
14396
14396
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14397
14397
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -14399,43 +14399,6 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
14399
14399
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14400
14400
|
}
|
|
14401
14401
|
__name(_ts_decorate, "_ts_decorate");
|
|
14402
|
-
var RequestContextService = class {
|
|
14403
|
-
static {
|
|
14404
|
-
__name(this, "RequestContextService");
|
|
14405
|
-
}
|
|
14406
|
-
storage = new import_async_hooks.AsyncLocalStorage();
|
|
14407
|
-
run(context, callback) {
|
|
14408
|
-
const store = {
|
|
14409
|
-
...context
|
|
14410
|
-
};
|
|
14411
|
-
return this.storage.run(store, callback);
|
|
14412
|
-
}
|
|
14413
|
-
setContext(partial) {
|
|
14414
|
-
const store = this.storage.getStore();
|
|
14415
|
-
if (!store) {
|
|
14416
|
-
return;
|
|
14417
|
-
}
|
|
14418
|
-
Object.assign(store, partial);
|
|
14419
|
-
}
|
|
14420
|
-
getContext() {
|
|
14421
|
-
return this.storage.getStore();
|
|
14422
|
-
}
|
|
14423
|
-
get(key) {
|
|
14424
|
-
return this.storage.getStore()?.[key];
|
|
14425
|
-
}
|
|
14426
|
-
};
|
|
14427
|
-
RequestContextService = _ts_decorate([
|
|
14428
|
-
(0, import_common.Injectable)()
|
|
14429
|
-
], RequestContextService);
|
|
14430
|
-
|
|
14431
|
-
// src/service/app-logger.service.ts
|
|
14432
|
-
function _ts_decorate2(decorators, target, key, desc) {
|
|
14433
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14434
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
14435
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14436
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14437
|
-
}
|
|
14438
|
-
__name(_ts_decorate2, "_ts_decorate");
|
|
14439
14402
|
function _ts_metadata(k, v) {
|
|
14440
14403
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
14441
14404
|
}
|
|
@@ -14544,13 +14507,12 @@ var BasePinoLogger = class _BasePinoLogger {
|
|
|
14544
14507
|
logger;
|
|
14545
14508
|
contextStore;
|
|
14546
14509
|
levelState = new LogLevelState();
|
|
14547
|
-
|
|
14510
|
+
observableService = new import_nestjs_observable.ObservableService();
|
|
14548
14511
|
constructor(logger, contextStore) {
|
|
14549
14512
|
this.logger = logger;
|
|
14550
14513
|
this.contextStore = contextStore;
|
|
14551
14514
|
const pinoLevel = this.logger.level;
|
|
14552
14515
|
const nestLevels = LogLevelState.fromPinoLevel(pinoLevel);
|
|
14553
|
-
this.otelLogger.start();
|
|
14554
14516
|
this.levelState.set(nestLevels);
|
|
14555
14517
|
}
|
|
14556
14518
|
setLogLevels(levels) {
|
|
@@ -14612,6 +14574,26 @@ var BasePinoLogger = class _BasePinoLogger {
|
|
|
14612
14574
|
const { context, stack, extras } = this.extractOptionalParams(optionalParams, treatStack);
|
|
14613
14575
|
const requestState = this.contextStore.getContext();
|
|
14614
14576
|
const traceId = requestState?.requestId ?? null;
|
|
14577
|
+
const flatObject = /* @__PURE__ */ __name((extra) => {
|
|
14578
|
+
let res = {};
|
|
14579
|
+
try {
|
|
14580
|
+
extra.forEach((item) => {
|
|
14581
|
+
if (typeof item === "object" && item !== null) {
|
|
14582
|
+
res = {
|
|
14583
|
+
...res,
|
|
14584
|
+
...item
|
|
14585
|
+
};
|
|
14586
|
+
}
|
|
14587
|
+
});
|
|
14588
|
+
delete res.message;
|
|
14589
|
+
delete res.level;
|
|
14590
|
+
delete res.time;
|
|
14591
|
+
delete res.context;
|
|
14592
|
+
return res;
|
|
14593
|
+
} catch {
|
|
14594
|
+
}
|
|
14595
|
+
}, "flatObject");
|
|
14596
|
+
const processedExtra = flatObject(extras);
|
|
14615
14597
|
const payload = {
|
|
14616
14598
|
trace_id: traceId,
|
|
14617
14599
|
path: requestState?.path,
|
|
@@ -14619,12 +14601,13 @@ var BasePinoLogger = class _BasePinoLogger {
|
|
|
14619
14601
|
user_id: requestState?.userId ?? null,
|
|
14620
14602
|
app_id: requestState?.appId ?? null,
|
|
14621
14603
|
tenant_id: requestState?.tenantId ?? null,
|
|
14622
|
-
pid: process.pid
|
|
14604
|
+
pid: process.pid,
|
|
14605
|
+
...processedExtra
|
|
14623
14606
|
};
|
|
14624
14607
|
if (context) {
|
|
14625
14608
|
payload.context = context;
|
|
14626
14609
|
}
|
|
14627
|
-
const { messageText, stack: computedStack, data } = this.buildMessagePayload(message
|
|
14610
|
+
const { messageText, stack: computedStack, data } = this.buildMessagePayload(message);
|
|
14628
14611
|
if (stack) {
|
|
14629
14612
|
payload.stack = stack;
|
|
14630
14613
|
} else if (computedStack) {
|
|
@@ -14635,12 +14618,15 @@ var BasePinoLogger = class _BasePinoLogger {
|
|
|
14635
14618
|
}
|
|
14636
14619
|
const pinoLevel = mapLogLevelToPino(level);
|
|
14637
14620
|
const sanitizedPayload = sanitizeValue(payload);
|
|
14638
|
-
if (
|
|
14639
|
-
|
|
14621
|
+
if (process.env.NODE_ENV === "development") {
|
|
14622
|
+
if (messageText) {
|
|
14623
|
+
this.logger[pinoLevel](sanitizedPayload, messageText);
|
|
14624
|
+
} else {
|
|
14625
|
+
this.logger[pinoLevel](sanitizedPayload);
|
|
14626
|
+
}
|
|
14640
14627
|
} else {
|
|
14641
|
-
this.
|
|
14628
|
+
this.observableService.log(level, messageText ?? "", payload);
|
|
14642
14629
|
}
|
|
14643
|
-
this.otelLogger.log(level, messageText ?? "");
|
|
14644
14630
|
}
|
|
14645
14631
|
extractOptionalParams(optionalParams, treatStack) {
|
|
14646
14632
|
const params = [
|
|
@@ -14668,7 +14654,7 @@ var BasePinoLogger = class _BasePinoLogger {
|
|
|
14668
14654
|
extras: params
|
|
14669
14655
|
};
|
|
14670
14656
|
}
|
|
14671
|
-
buildMessagePayload(message
|
|
14657
|
+
buildMessagePayload(message) {
|
|
14672
14658
|
if (message instanceof Error) {
|
|
14673
14659
|
return {
|
|
14674
14660
|
messageText: message.message,
|
|
@@ -14676,17 +14662,8 @@ var BasePinoLogger = class _BasePinoLogger {
|
|
|
14676
14662
|
};
|
|
14677
14663
|
}
|
|
14678
14664
|
if (typeof message === "string") {
|
|
14679
|
-
if (extras.length === 0) {
|
|
14680
|
-
return {
|
|
14681
|
-
messageText: message
|
|
14682
|
-
};
|
|
14683
|
-
}
|
|
14684
|
-
const allMessages = [
|
|
14685
|
-
message,
|
|
14686
|
-
...extras.map((e) => stringifyParam(e))
|
|
14687
|
-
].join(" ");
|
|
14688
14665
|
return {
|
|
14689
|
-
messageText:
|
|
14666
|
+
messageText: message
|
|
14690
14667
|
};
|
|
14691
14668
|
}
|
|
14692
14669
|
if (typeof message === "object" && message !== null) {
|
|
@@ -14711,16 +14688,16 @@ var AppLogger = class extends BasePinoLogger {
|
|
|
14711
14688
|
}
|
|
14712
14689
|
constructor(logger, requestContext) {
|
|
14713
14690
|
super(logger, requestContext);
|
|
14714
|
-
|
|
14691
|
+
import_common.Logger.overrideLogger(this);
|
|
14715
14692
|
}
|
|
14716
14693
|
};
|
|
14717
|
-
AppLogger =
|
|
14718
|
-
(0,
|
|
14719
|
-
_ts_param(0, (0,
|
|
14694
|
+
AppLogger = _ts_decorate([
|
|
14695
|
+
(0, import_common.Injectable)(),
|
|
14696
|
+
_ts_param(0, (0, import_common.Inject)(PINO_ROOT_LOGGER)),
|
|
14720
14697
|
_ts_metadata("design:type", Function),
|
|
14721
14698
|
_ts_metadata("design:paramtypes", [
|
|
14722
14699
|
typeof PinoLogger === "undefined" ? Object : PinoLogger,
|
|
14723
|
-
typeof RequestContextService === "undefined" ? Object : RequestContextService
|
|
14700
|
+
typeof import_nestjs_common.RequestContextService === "undefined" ? Object : import_nestjs_common.RequestContextService
|
|
14724
14701
|
])
|
|
14725
14702
|
], AppLogger);
|
|
14726
14703
|
var PinoLoggerService = class extends BasePinoLogger {
|
|
@@ -14746,18 +14723,6 @@ function mapLogLevelToPino(level) {
|
|
|
14746
14723
|
}
|
|
14747
14724
|
}
|
|
14748
14725
|
__name(mapLogLevelToPino, "mapLogLevelToPino");
|
|
14749
|
-
function stringifyParam(param) {
|
|
14750
|
-
if (typeof param === "string") {
|
|
14751
|
-
return param;
|
|
14752
|
-
}
|
|
14753
|
-
const inspectOptions = {
|
|
14754
|
-
depth: 4,
|
|
14755
|
-
colors: false,
|
|
14756
|
-
compact: true
|
|
14757
|
-
};
|
|
14758
|
-
return (0, import_util.inspect)(param, inspectOptions);
|
|
14759
|
-
}
|
|
14760
|
-
__name(stringifyParam, "stringifyParam");
|
|
14761
14726
|
function sanitizeValue(value) {
|
|
14762
14727
|
if (value === null || value === void 0) {
|
|
14763
14728
|
return value;
|
|
@@ -14780,9 +14745,10 @@ function sanitizeValue(value) {
|
|
|
14780
14745
|
__name(sanitizeValue, "sanitizeValue");
|
|
14781
14746
|
|
|
14782
14747
|
// src/module.ts
|
|
14783
|
-
var
|
|
14748
|
+
var import_common4 = require("@nestjs/common");
|
|
14784
14749
|
var import_core = require("@nestjs/core");
|
|
14785
14750
|
var import_config3 = __toESM(require_config2(), 1);
|
|
14751
|
+
var import_nestjs_common4 = require("@lark-apaas/nestjs-common");
|
|
14786
14752
|
|
|
14787
14753
|
// src/config/logger.config.ts
|
|
14788
14754
|
var import_config = __toESM(require_config2(), 1);
|
|
@@ -14816,17 +14782,18 @@ var logger_config_default = (0, import_config.registerAs)("logger", () => {
|
|
|
14816
14782
|
});
|
|
14817
14783
|
|
|
14818
14784
|
// src/interceptor/logging.interceptor.ts
|
|
14819
|
-
var
|
|
14785
|
+
var import_common2 = require("@nestjs/common");
|
|
14820
14786
|
var import_config2 = __toESM(require_config2(), 1);
|
|
14821
14787
|
var import_operators = __toESM(require_operators(), 1);
|
|
14822
|
-
var
|
|
14823
|
-
|
|
14788
|
+
var import_util = require("util");
|
|
14789
|
+
var import_nestjs_common2 = require("@lark-apaas/nestjs-common");
|
|
14790
|
+
function _ts_decorate2(decorators, target, key, desc) {
|
|
14824
14791
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14825
14792
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
14826
14793
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14827
14794
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14828
14795
|
}
|
|
14829
|
-
__name(
|
|
14796
|
+
__name(_ts_decorate2, "_ts_decorate");
|
|
14830
14797
|
function _ts_metadata2(k, v) {
|
|
14831
14798
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
14832
14799
|
}
|
|
@@ -14950,7 +14917,7 @@ duration_ms=${durationMs}`, "HTTPTraceInterceptor");
|
|
|
14950
14917
|
this.traceLogger.logStructured(traceLevel, isError ? "HTTP request failed" : "HTTP request completed", responseMeta, "HTTPTraceInterceptor");
|
|
14951
14918
|
});
|
|
14952
14919
|
return next.handle().pipe((0, import_operators.catchError)((error) => {
|
|
14953
|
-
this.appLogger.error((0,
|
|
14920
|
+
this.appLogger.error((0, import_util.format)("HTTP request exception\nmethod=%s url=%s\nerror=%o", req.method, req.url, error), "HTTPTraceInterceptor");
|
|
14954
14921
|
throw error;
|
|
14955
14922
|
}));
|
|
14956
14923
|
}
|
|
@@ -14975,20 +14942,21 @@ duration_ms=${durationMs}`, "HTTPTraceInterceptor");
|
|
|
14975
14942
|
return {
|
|
14976
14943
|
_error: "Failed to serialize data",
|
|
14977
14944
|
_type: typeof data,
|
|
14945
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14978
14946
|
_constructor: data?.constructor?.name
|
|
14979
14947
|
};
|
|
14980
14948
|
}
|
|
14981
14949
|
}
|
|
14982
14950
|
};
|
|
14983
|
-
LoggingInterceptor =
|
|
14984
|
-
(0,
|
|
14985
|
-
_ts_param2(0, (0,
|
|
14986
|
-
_ts_param2(2, (0,
|
|
14987
|
-
_ts_param2(3, (0,
|
|
14951
|
+
LoggingInterceptor = _ts_decorate2([
|
|
14952
|
+
(0, import_common2.Injectable)(),
|
|
14953
|
+
_ts_param2(0, (0, import_common2.Inject)(TRACE_LOGGER)),
|
|
14954
|
+
_ts_param2(2, (0, import_common2.Inject)(AppLogger)),
|
|
14955
|
+
_ts_param2(3, (0, import_common2.Inject)(logger_config_default.KEY)),
|
|
14988
14956
|
_ts_metadata2("design:type", Function),
|
|
14989
14957
|
_ts_metadata2("design:paramtypes", [
|
|
14990
14958
|
typeof PinoLoggerService === "undefined" ? Object : PinoLoggerService,
|
|
14991
|
-
typeof RequestContextService === "undefined" ? Object : RequestContextService,
|
|
14959
|
+
typeof import_nestjs_common2.RequestContextService === "undefined" ? Object : import_nestjs_common2.RequestContextService,
|
|
14992
14960
|
typeof AppLogger === "undefined" ? Object : AppLogger,
|
|
14993
14961
|
typeof import_config2.ConfigType === "undefined" ? Object : import_config2.ConfigType
|
|
14994
14962
|
])
|
|
@@ -15045,15 +15013,16 @@ function createFileDestination(pathname) {
|
|
|
15045
15013
|
__name(createFileDestination, "createFileDestination");
|
|
15046
15014
|
|
|
15047
15015
|
// src/middleware/logger-context.middleware.ts
|
|
15048
|
-
var
|
|
15016
|
+
var import_common3 = require("@nestjs/common");
|
|
15049
15017
|
var import_crypto = require("crypto");
|
|
15050
|
-
|
|
15018
|
+
var import_nestjs_common3 = require("@lark-apaas/nestjs-common");
|
|
15019
|
+
function _ts_decorate3(decorators, target, key, desc) {
|
|
15051
15020
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15052
15021
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15053
15022
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
15054
15023
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15055
15024
|
}
|
|
15056
|
-
__name(
|
|
15025
|
+
__name(_ts_decorate3, "_ts_decorate");
|
|
15057
15026
|
function _ts_metadata3(k, v) {
|
|
15058
15027
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
15059
15028
|
}
|
|
@@ -15084,35 +15053,35 @@ var LoggerContextMiddleware = class {
|
|
|
15084
15053
|
}, () => next());
|
|
15085
15054
|
}
|
|
15086
15055
|
};
|
|
15087
|
-
LoggerContextMiddleware =
|
|
15088
|
-
(0,
|
|
15056
|
+
LoggerContextMiddleware = _ts_decorate3([
|
|
15057
|
+
(0, import_common3.Injectable)(),
|
|
15089
15058
|
_ts_metadata3("design:type", Function),
|
|
15090
15059
|
_ts_metadata3("design:paramtypes", [
|
|
15091
|
-
typeof RequestContextService === "undefined" ? Object : RequestContextService
|
|
15060
|
+
typeof import_nestjs_common3.RequestContextService === "undefined" ? Object : import_nestjs_common3.RequestContextService
|
|
15092
15061
|
])
|
|
15093
15062
|
], LoggerContextMiddleware);
|
|
15094
15063
|
|
|
15095
15064
|
// src/module.ts
|
|
15096
|
-
function
|
|
15065
|
+
function _ts_decorate4(decorators, target, key, desc) {
|
|
15097
15066
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15098
15067
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15099
15068
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
15100
15069
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15101
15070
|
}
|
|
15102
|
-
__name(
|
|
15071
|
+
__name(_ts_decorate4, "_ts_decorate");
|
|
15103
15072
|
var LoggerModule = class {
|
|
15104
15073
|
static {
|
|
15105
15074
|
__name(this, "LoggerModule");
|
|
15106
15075
|
}
|
|
15107
15076
|
};
|
|
15108
|
-
LoggerModule =
|
|
15109
|
-
(0,
|
|
15110
|
-
(0,
|
|
15077
|
+
LoggerModule = _ts_decorate4([
|
|
15078
|
+
(0, import_common4.Global)(),
|
|
15079
|
+
(0, import_common4.Module)({
|
|
15111
15080
|
imports: [
|
|
15112
|
-
import_config3.ConfigModule.forFeature(logger_config_default)
|
|
15081
|
+
import_config3.ConfigModule.forFeature(logger_config_default),
|
|
15082
|
+
import_nestjs_common4.CommonModule
|
|
15113
15083
|
],
|
|
15114
15084
|
providers: [
|
|
15115
|
-
RequestContextService,
|
|
15116
15085
|
LoggerContextMiddleware,
|
|
15117
15086
|
{
|
|
15118
15087
|
provide: PINO_ROOT_LOGGER,
|
|
@@ -15133,7 +15102,7 @@ LoggerModule = _ts_decorate5([
|
|
|
15133
15102
|
filePath: `${config.logDir}/trace.log`
|
|
15134
15103
|
}), requestContext), "useFactory"),
|
|
15135
15104
|
inject: [
|
|
15136
|
-
RequestContextService,
|
|
15105
|
+
import_nestjs_common4.RequestContextService,
|
|
15137
15106
|
logger_config_default.KEY
|
|
15138
15107
|
]
|
|
15139
15108
|
},
|
|
@@ -15147,17 +15116,20 @@ LoggerModule = _ts_decorate5([
|
|
|
15147
15116
|
exports: [
|
|
15148
15117
|
AppLogger,
|
|
15149
15118
|
TRACE_LOGGER,
|
|
15150
|
-
RequestContextService,
|
|
15151
15119
|
LoggerContextMiddleware
|
|
15152
15120
|
]
|
|
15153
15121
|
})
|
|
15154
15122
|
], LoggerModule);
|
|
15123
|
+
|
|
15124
|
+
// src/index.ts
|
|
15125
|
+
var import_nestjs_common5 = require("@lark-apaas/nestjs-common");
|
|
15155
15126
|
// Annotate the CommonJS export names for ESM import in node:
|
|
15156
15127
|
0 && (module.exports = {
|
|
15157
15128
|
AppLogger,
|
|
15158
15129
|
LoggerContextMiddleware,
|
|
15159
15130
|
LoggerModule,
|
|
15160
15131
|
PinoLoggerService,
|
|
15132
|
+
RequestContextService,
|
|
15161
15133
|
TRACE_LOGGER
|
|
15162
15134
|
});
|
|
15163
15135
|
//# sourceMappingURL=index.cjs.map
|