@punks/backend-core 0.0.82 → 0.0.84
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/cjs/index.js +16 -14
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +16 -14
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -31221,29 +31221,29 @@ class InternalLogger {
|
|
|
31221
31221
|
this.loggerName = loggerName;
|
|
31222
31222
|
this.container = container;
|
|
31223
31223
|
}
|
|
31224
|
-
debug(message, meta) {
|
|
31225
|
-
this.getEnabledInstances(LogLevel.Debug).forEach((x) => x.provider.debug(this.loggerName, message, this.serializeMeta(x.options, meta)));
|
|
31224
|
+
debug(message, meta, options) {
|
|
31225
|
+
this.getEnabledInstances(LogLevel.Debug).forEach((x) => x.provider.debug(this.loggerName, message, this.serializeMeta(x.options, meta, options)));
|
|
31226
31226
|
}
|
|
31227
|
-
info(message, meta) {
|
|
31228
|
-
this.getEnabledInstances(LogLevel.Info).forEach((x) => x.provider.info(this.loggerName, message, this.serializeMeta(x.options, meta)));
|
|
31227
|
+
info(message, meta, options) {
|
|
31228
|
+
this.getEnabledInstances(LogLevel.Info).forEach((x) => x.provider.info(this.loggerName, message, this.serializeMeta(x.options, meta, options)));
|
|
31229
31229
|
}
|
|
31230
|
-
warn(message, meta) {
|
|
31231
|
-
this.getEnabledInstances(LogLevel.Warn).forEach((x) => x.provider.warn(this.loggerName, message, this.serializeMeta(x.options, meta)));
|
|
31230
|
+
warn(message, meta, options) {
|
|
31231
|
+
this.getEnabledInstances(LogLevel.Warn).forEach((x) => x.provider.warn(this.loggerName, message, this.serializeMeta(x.options, meta, options)));
|
|
31232
31232
|
}
|
|
31233
|
-
error(message, meta) {
|
|
31234
|
-
this.getEnabledInstances(LogLevel.Error).forEach((x) => x.provider.error(this.loggerName, message, this.serializeMeta(x.options, meta)));
|
|
31233
|
+
error(message, meta, options) {
|
|
31234
|
+
this.getEnabledInstances(LogLevel.Error).forEach((x) => x.provider.error(this.loggerName, message, this.serializeMeta(x.options, meta, options)));
|
|
31235
31235
|
}
|
|
31236
|
-
fatal(message, meta) {
|
|
31237
|
-
this.getEnabledInstances(LogLevel.Fatal).forEach((x) => x.provider.fatal(this.loggerName, message, this.serializeMeta(x.options, meta)));
|
|
31236
|
+
fatal(message, meta, options) {
|
|
31237
|
+
this.getEnabledInstances(LogLevel.Fatal).forEach((x) => x.provider.fatal(this.loggerName, message, this.serializeMeta(x.options, meta, options)));
|
|
31238
31238
|
}
|
|
31239
|
-
exception(message, error, meta) {
|
|
31240
|
-
this.getEnabledInstances(LogLevel.Error).forEach((x) => x.provider.exception(this.loggerName, message, error, this.serializeMeta(x.options, meta)));
|
|
31239
|
+
exception(message, error, meta, options) {
|
|
31240
|
+
this.getEnabledInstances(LogLevel.Error).forEach((x) => x.provider.exception(this.loggerName, message, error, this.serializeMeta(x.options, meta, options)));
|
|
31241
31241
|
}
|
|
31242
31242
|
getEnabledInstances(level) {
|
|
31243
31243
|
return this.container.instances.filter((x) => x.options.enabled &&
|
|
31244
31244
|
getLevelValue(x.options.level) <= getLevelValue(level));
|
|
31245
31245
|
}
|
|
31246
|
-
serializeMeta(options, meta) {
|
|
31246
|
+
serializeMeta(options, meta, logOptions) {
|
|
31247
31247
|
if (meta && typeof meta === "string") {
|
|
31248
31248
|
return meta;
|
|
31249
31249
|
}
|
|
@@ -31253,7 +31253,9 @@ class InternalLogger {
|
|
|
31253
31253
|
});
|
|
31254
31254
|
switch (options.serialization) {
|
|
31255
31255
|
case MetaSerializationType.JSON:
|
|
31256
|
-
return serializedMeta &&
|
|
31256
|
+
return serializedMeta &&
|
|
31257
|
+
options.maxMetaLength &&
|
|
31258
|
+
!logOptions?.truncateMetaDisabled
|
|
31257
31259
|
? truncateString(serializedMeta, options.maxMetaLength, "...")
|
|
31258
31260
|
: serializedMeta;
|
|
31259
31261
|
case MetaSerializationType.None:
|