@lark-apaas/nestjs-logger 1.0.1-alpha.2 → 1.0.1-alpha.3
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 +2 -2
- package/dist/index.cjs +14 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14371,6 +14371,7 @@ var require_operators = __commonJS({
|
|
|
14371
14371
|
|
|
14372
14372
|
// src/service/app-logger.service.ts
|
|
14373
14373
|
import { Inject, Injectable as Injectable2, Logger } from "@nestjs/common";
|
|
14374
|
+
import { inspect } from "util";
|
|
14374
14375
|
|
|
14375
14376
|
// src/helper/constants.ts
|
|
14376
14377
|
var PINO_ROOT_LOGGER = Symbol("PINO_ROOT_LOGGER");
|
|
@@ -14668,7 +14669,7 @@ var BasePinoLogger = class _BasePinoLogger {
|
|
|
14668
14669
|
}
|
|
14669
14670
|
const allMessages = [
|
|
14670
14671
|
message,
|
|
14671
|
-
...extras.map((e) =>
|
|
14672
|
+
...extras.map((e) => stringifyParam(e))
|
|
14672
14673
|
].join(" ");
|
|
14673
14674
|
return {
|
|
14674
14675
|
messageText: allMessages
|
|
@@ -14731,6 +14732,18 @@ function mapLogLevelToPino(level) {
|
|
|
14731
14732
|
}
|
|
14732
14733
|
}
|
|
14733
14734
|
__name(mapLogLevelToPino, "mapLogLevelToPino");
|
|
14735
|
+
function stringifyParam(param) {
|
|
14736
|
+
if (typeof param === "string") {
|
|
14737
|
+
return param;
|
|
14738
|
+
}
|
|
14739
|
+
const inspectOptions = {
|
|
14740
|
+
depth: 4,
|
|
14741
|
+
colors: false,
|
|
14742
|
+
compact: true
|
|
14743
|
+
};
|
|
14744
|
+
return inspect(param, inspectOptions);
|
|
14745
|
+
}
|
|
14746
|
+
__name(stringifyParam, "stringifyParam");
|
|
14734
14747
|
function sanitizeValue(value) {
|
|
14735
14748
|
if (value === null || value === void 0) {
|
|
14736
14749
|
return value;
|