logixia 2.1.0 → 2.2.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.
Files changed (101) hide show
  1. package/README.md +2 -2
  2. package/dist/{async-context-fBqC5lNc.mjs → async-context-1YMPGgJZ.mjs} +2 -2
  3. package/dist/{async-context-fBqC5lNc.mjs.map → async-context-1YMPGgJZ.mjs.map} +1 -1
  4. package/dist/{async-context-Dgl3ZLyb.js → async-context-CoPhbRG0.js} +2 -2
  5. package/dist/{async-context-Dgl3ZLyb.js.map → async-context-CoPhbRG0.js.map} +1 -1
  6. package/dist/{azure-monitor.transport-DGiacfvT.mjs → azure-monitor.transport-B_dqSV_o.mjs} +3 -3
  7. package/dist/{azure-monitor.transport-DGiacfvT.mjs.map → azure-monitor.transport-B_dqSV_o.mjs.map} +1 -1
  8. package/dist/{azure-monitor.transport-DX3fuK2t.js → azure-monitor.transport-Bl3xVvpN.js} +3 -3
  9. package/dist/{azure-monitor.transport-DX3fuK2t.js.map → azure-monitor.transport-Bl3xVvpN.js.map} +1 -1
  10. package/dist/azure.js +1 -1
  11. package/dist/azure.mjs +1 -1
  12. package/dist/{batch-buffer-CM-lK_Qy.mjs → batch-buffer-BnmVCCwI.mjs} +2 -2
  13. package/dist/{batch-buffer-CM-lK_Qy.mjs.map → batch-buffer-BnmVCCwI.mjs.map} +1 -1
  14. package/dist/{batch-buffer-BLmVvJAZ.js → batch-buffer-C-ETEX3Y.js} +2 -2
  15. package/dist/{batch-buffer-BLmVvJAZ.js.map → batch-buffer-C-ETEX3Y.js.map} +1 -1
  16. package/dist/browser.js +15 -11
  17. package/dist/browser.js.map +1 -1
  18. package/dist/browser.mjs +15 -11
  19. package/dist/browser.mjs.map +1 -1
  20. package/dist/{builder-CA_dokb4.mjs → builder-CbttbixM.mjs} +54 -222
  21. package/dist/builder-CbttbixM.mjs.map +1 -0
  22. package/dist/{builder-jMlVYaQa.js → builder-Ck1tsC5d.js} +57 -249
  23. package/dist/builder-Ck1tsC5d.js.map +1 -0
  24. package/dist/cloudwatch.js +1 -1
  25. package/dist/cloudwatch.mjs +1 -1
  26. package/dist/{cloudwatch.transport-Cr0fEpko.mjs → cloudwatch.transport-Brh5fmRN.mjs} +3 -3
  27. package/dist/{cloudwatch.transport-Cr0fEpko.mjs.map → cloudwatch.transport-Brh5fmRN.mjs.map} +1 -1
  28. package/dist/{cloudwatch.transport-Lst1Bbmr.js → cloudwatch.transport-DO9e__Z-.js} +3 -3
  29. package/dist/{cloudwatch.transport-Lst1Bbmr.js.map → cloudwatch.transport-DO9e__Z-.js.map} +1 -1
  30. package/dist/correlation.js +2 -2
  31. package/dist/correlation.mjs +2 -2
  32. package/dist/error.utils-B8_CwESF.mjs +189 -0
  33. package/dist/error.utils-B8_CwESF.mjs.map +1 -0
  34. package/dist/error.utils-fZkRExam.js +212 -0
  35. package/dist/error.utils-fZkRExam.js.map +1 -0
  36. package/dist/fastify.d.mts +89 -0
  37. package/dist/fastify.d.mts.map +1 -0
  38. package/dist/fastify.d.ts +89 -0
  39. package/dist/fastify.d.ts.map +1 -0
  40. package/dist/fastify.js +265 -0
  41. package/dist/fastify.js.map +1 -0
  42. package/dist/fastify.mjs +263 -0
  43. package/dist/fastify.mjs.map +1 -0
  44. package/dist/gcp.js +1 -1
  45. package/dist/gcp.mjs +1 -1
  46. package/dist/{gcp.transport-Cw3Qke85.mjs → gcp.transport-BY1Z3cS0.mjs} +3 -3
  47. package/dist/{gcp.transport-Cw3Qke85.mjs.map → gcp.transport-BY1Z3cS0.mjs.map} +1 -1
  48. package/dist/{gcp.transport-5-ZIjN8r.js → gcp.transport-V9R4dwdT.js} +3 -3
  49. package/dist/{gcp.transport-5-ZIjN8r.js.map → gcp.transport-V9R4dwdT.js.map} +1 -1
  50. package/dist/hono.d.mts +66 -0
  51. package/dist/hono.d.mts.map +1 -0
  52. package/dist/hono.d.ts +66 -0
  53. package/dist/hono.d.ts.map +1 -0
  54. package/dist/hono.js +512 -0
  55. package/dist/hono.js.map +1 -0
  56. package/dist/hono.mjs +511 -0
  57. package/dist/hono.mjs.map +1 -0
  58. package/dist/index.js +12 -11
  59. package/dist/index.js.map +1 -1
  60. package/dist/index.mjs +6 -5
  61. package/dist/index.mjs.map +1 -1
  62. package/dist/logitron-logger-Csn3e6Qu.d.ts.map +1 -1
  63. package/dist/logitron-logger-fMOkXr8H.d.mts.map +1 -1
  64. package/dist/middleware.js +1 -1
  65. package/dist/middleware.mjs +1 -1
  66. package/dist/nest.js +5 -4
  67. package/dist/nest.js.map +1 -1
  68. package/dist/nest.mjs +4 -3
  69. package/dist/nest.mjs.map +1 -1
  70. package/dist/{otel-8ypFGG19.js → otel-BrgvxLDW.js} +3 -3
  71. package/dist/{otel-8ypFGG19.js.map → otel-BrgvxLDW.js.map} +1 -1
  72. package/dist/{otel-b-s2QbY4.mjs → otel-C5jBV_l_.mjs} +3 -3
  73. package/dist/{otel-b-s2QbY4.mjs.map → otel-C5jBV_l_.mjs.map} +1 -1
  74. package/dist/{request-trace-C7kXMjx5.js → request-trace-6NBSw5lt.js} +14 -3
  75. package/dist/{request-trace-C7kXMjx5.js.map → request-trace-6NBSw5lt.js.map} +1 -1
  76. package/dist/{request-trace-Dekcnenb.mjs → request-trace-txUhyyre.mjs} +9 -4
  77. package/dist/{request-trace-Dekcnenb.mjs.map → request-trace-txUhyyre.mjs.map} +1 -1
  78. package/dist/{secret-config-GKmb15Me.mjs → secret-config-Cng7XPLx.mjs} +16 -12
  79. package/dist/secret-config-Cng7XPLx.mjs.map +1 -0
  80. package/dist/{secret-config--cVTOWwp.js → secret-config-OqmIPmpV.js} +16 -12
  81. package/dist/secret-config-OqmIPmpV.js.map +1 -0
  82. package/dist/{slack.transport-Qwj9WkrJ.mjs → slack.transport-C6dzPJHX.mjs} +4 -4
  83. package/dist/{slack.transport-Qwj9WkrJ.mjs.map → slack.transport-C6dzPJHX.mjs.map} +1 -1
  84. package/dist/{slack.transport-Cpx5fKga.js → slack.transport-Ci0swStG.js} +4 -4
  85. package/dist/{slack.transport-Cpx5fKga.js.map → slack.transport-Ci0swStG.js.map} +1 -1
  86. package/dist/transports.d.mts +1 -1
  87. package/dist/transports.d.ts +1 -1
  88. package/dist/transports.js +6 -6
  89. package/dist/transports.mjs +6 -6
  90. package/dist/worker-entry.js +15 -11
  91. package/dist/worker.js +1 -1
  92. package/dist/worker.mjs +1 -1
  93. package/dist/{worker.transport-C7jNGhev.js → worker.transport-CZOutlxC.js} +2 -2
  94. package/dist/{worker.transport-C7jNGhev.js.map → worker.transport-CZOutlxC.js.map} +1 -1
  95. package/dist/{worker.transport-BHnWDXPH.mjs → worker.transport-CxFD8mvS.mjs} +2 -2
  96. package/dist/{worker.transport-BHnWDXPH.mjs.map → worker.transport-CxFD8mvS.mjs.map} +1 -1
  97. package/package.json +37 -2
  98. package/dist/builder-CA_dokb4.mjs.map +0 -1
  99. package/dist/builder-jMlVYaQa.js.map +0 -1
  100. package/dist/secret-config--cVTOWwp.js.map +0 -1
  101. package/dist/secret-config-GKmb15Me.mjs.map +0 -1
@@ -1,12 +1,13 @@
1
- const require_secret_config = require("./secret-config--cVTOWwp.js");
1
+ const require_secret_config = require("./secret-config-OqmIPmpV.js");
2
2
  const require_own_property = require("./own-property-BWkibepN.js");
3
- const require_request_trace = require("./request-trace-C7kXMjx5.js");
4
- const require_async_context = require("./async-context-Dgl3ZLyb.js");
3
+ const require_request_trace = require("./request-trace-6NBSw5lt.js");
4
+ const require_async_context = require("./async-context-CoPhbRG0.js");
5
5
  const require_sensitive_names = require("./sensitive-names-NiKIRhp5.js");
6
6
  const require_internal_log = require("./internal-log-DwqTjhpb.js");
7
7
  const require_safe_stringify = require("./safe-stringify-J3sh-7YM.js");
8
8
  const require_csv_utils = require("./csv.utils-CbVHY1pd.js");
9
- const require_otel = require("./otel-8ypFGG19.js");
9
+ const require_otel = require("./otel-BrgvxLDW.js");
10
+ const require_error_utils = require("./error.utils-fZkRExam.js");
10
11
  let node_os = require("node:os");
11
12
  // src/types/index.ts
12
13
  const LogLevel = {
@@ -180,191 +181,6 @@ const globalPluginRegistry = new PluginRegistry();
180
181
  function usePlugin(plugin) {
181
182
  globalPluginRegistry.register(plugin);
182
183
  }
183
- // src/utils/error.utils.ts
184
- const EXTRA_FIELDS = [
185
- "code",
186
- "statusCode",
187
- "status",
188
- "errno",
189
- "syscall",
190
- "path",
191
- "address",
192
- "port",
193
- "type"
194
- ];
195
- const SKIPPED_FIELDS = /* @__PURE__ */ new Set([
196
- "name",
197
- "message",
198
- "stack",
199
- "cause",
200
- "errors",
201
- ...EXTRA_FIELDS
202
- ]);
203
- const NO_OPTIONS = Object.freeze({});
204
- const NO_FIELDS = [];
205
- /**
206
- * Serialize an Error into a plain JSON-safe object, including:
207
- * - `name`, `message`, `stack`
208
- * - `cause` (recursively serialized, full ES2022 chain)
209
- * - `errors` (for AggregateError)
210
- * - standard Node.js error fields (`code`, `statusCode`, `errno`, …)
211
- * - any other enumerable own properties
212
- */
213
- function serializeError(error, options = NO_OPTIONS) {
214
- const { includeStack = true, maxDepth = 5, excludeFields = NO_FIELDS } = options;
215
- return _serializeError(error, includeStack, maxDepth, excludeFields, 0, /* @__PURE__ */ new WeakSet());
216
- }
217
- function _serializeError(error, includeStack, maxDepth, excludeFields, depth, seen) {
218
- if (depth >= maxDepth) return {
219
- name: error.name,
220
- message: error.message,
221
- _truncated: true
222
- };
223
- if (seen.has(error)) return {
224
- name: error.name,
225
- message: error.message,
226
- _circular: true
227
- };
228
- seen.add(error);
229
- const serialized = {
230
- name: error.name,
231
- message: error.message
232
- };
233
- if (includeStack && error.stack) serialized.stack = error.stack;
234
- const errorWithCause = error;
235
- if (errorWithCause.cause !== void 0) {
236
- if (errorWithCause.cause instanceof Error) serialized.cause = _serializeError(errorWithCause.cause, includeStack, maxDepth, excludeFields, depth + 1, seen);
237
- else serialized.cause = serializeValue(errorWithCause.cause, maxDepth - depth - 1, seen);
238
- }
239
- const aggregateError = error;
240
- if (Array.isArray(aggregateError.errors)) serialized.errors = aggregateError.errors.map((e) => e instanceof Error ? _serializeError(e, includeStack, maxDepth, excludeFields, depth + 1, seen) : serializeValue(e, maxDepth - depth - 1, seen));
241
- const errorRecord = error;
242
- for (const field of EXTRA_FIELDS) if (!excludeFields.includes(field) && errorRecord[field] !== void 0) serialized[field] = errorRecord[field];
243
- const skip = excludeFields.length === 0 ? SKIPPED_FIELDS : /* @__PURE__ */ new Set([...SKIPPED_FIELDS, ...excludeFields]);
244
- for (const key of Object.getOwnPropertyNames(error)) {
245
- if (skip.has(key)) continue;
246
- try {
247
- require_own_property.assignOwn(serialized, key, serializeValue(errorRecord[key], maxDepth - depth - 1, seen));
248
- } catch {
249
- require_own_property.assignOwn(serialized, key, "[Unserializable]");
250
- }
251
- }
252
- return serialized;
253
- }
254
- /**
255
- * Recursively serialize an arbitrary value to a JSON-safe representation.
256
- *
257
- * The `seen` guard is threaded through (not recreated) so cross-referencing
258
- * errors nested inside plain objects/arrays are caught by the same circular
259
- * check that protects the top-level error tree, rather than only relying on the
260
- * depth limit.
261
- */
262
- function serializeValue(value, remainingDepth, seen) {
263
- if (remainingDepth <= 0) return "[Max Depth]";
264
- if (value === null || value === void 0) return value;
265
- if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
266
- if (value instanceof Date) return value.toISOString();
267
- if (value instanceof Error) {
268
- if (seen.has(value)) return {
269
- name: value.name,
270
- message: value.message,
271
- _circular: true
272
- };
273
- return _serializeError(value, true, remainingDepth, [], 0, seen);
274
- }
275
- if (Array.isArray(value)) {
276
- if (seen.has(value)) return "[Circular]";
277
- seen.add(value);
278
- return value.map((item) => serializeValue(item, remainingDepth - 1, seen));
279
- }
280
- if (typeof value === "object") {
281
- if (seen.has(value)) return "[Circular]";
282
- seen.add(value);
283
- const out = {};
284
- for (const [k, v] of Object.entries(value)) try {
285
- require_own_property.assignOwn(out, k, serializeValue(v, remainingDepth - 1, seen));
286
- } catch {
287
- require_own_property.assignOwn(out, k, "[Unserializable]");
288
- }
289
- return out;
290
- }
291
- return String(value);
292
- }
293
- /**
294
- * Type guard: returns true if the value looks like an Error object.
295
- */
296
- function isError(value) {
297
- return value instanceof Error || Boolean(value) && typeof value === "object" && "name" in value && "message" in value;
298
- }
299
- const MAX_ERROR_SEARCH_DEPTH = 3;
300
- const MAX_ERROR_SEARCH_NODES = 2e3;
301
- /**
302
- * Replaces real Error instances inside a log payload with their serialized form,
303
- * because JSON output drops an Error's non-enumerable `message` and `stack`. Runs on
304
- * every log call, so its work is capped and it copies nothing until it finds one.
305
- * Duck-typed objects are data, and an Error with its own toJSON has already chosen
306
- * what to show. The caller's objects are never mutated.
307
- */
308
- function serializeNestedErrors(data) {
309
- const outerBudget = errorSearchBudget;
310
- errorSearchBudget = MAX_ERROR_SEARCH_NODES;
311
- try {
312
- return walkForErrors(data, MAX_ERROR_SEARCH_DEPTH, void 0, void 0);
313
- } finally {
314
- errorSearchBudget = outerBudget;
315
- }
316
- }
317
- let errorSearchBudget = 0;
318
- const hasOwn = Object.prototype.hasOwnProperty;
319
- function walkForErrors(value, depth, parent, grandparent) {
320
- if (value instanceof Error) return typeof value.toJSON === "function" ? value : serializeError(value);
321
- if (depth === 0 || --errorSearchBudget < 0 || value === parent || value === grandparent) return value;
322
- let copy;
323
- if (Array.isArray(value)) for (let i = 0; i < value.length; i++) {
324
- const item = value[i];
325
- if (item === null || typeof item !== "object") continue;
326
- const next = walkForErrors(item, depth - 1, value, parent);
327
- if (next !== item) {
328
- copy ??= value.slice();
329
- copy[i] = next;
330
- }
331
- }
332
- else {
333
- const proto = Object.getPrototypeOf(value);
334
- if (proto !== Object.prototype && proto !== null) return value;
335
- const record = value;
336
- for (const key in record) {
337
- if (!hasOwn.call(record, key)) continue;
338
- let item;
339
- try {
340
- item = record[key];
341
- } catch {
342
- continue;
343
- }
344
- if (item === null || typeof item !== "object") continue;
345
- const next = walkForErrors(item, depth - 1, record, parent);
346
- if (next !== item) {
347
- copy ??= { ...record };
348
- require_own_property.assignOwn(copy, key, next);
349
- }
350
- }
351
- }
352
- return copy ?? value;
353
- }
354
- /**
355
- * Coerce any thrown value into a proper Error instance.
356
- */
357
- function normalizeError(error) {
358
- if (isError(error)) return error;
359
- if (typeof error === "string") return new Error(error);
360
- if (typeof error === "object" && error !== null) {
361
- const e = error;
362
- const err = new Error(typeof e["message"] === "string" ? e["message"] : "Unknown error");
363
- Object.assign(err, error);
364
- return err;
365
- }
366
- return new Error(String(error));
367
- }
368
184
  // src/utils/redact.utils.ts
369
185
  const DEFAULT_CENSOR = "[REDACTED]";
370
186
  /** Maximum nesting depth walked; deeper values are replaced with a marker. */
@@ -606,7 +422,7 @@ function walkRecord(obj, state, fullPath, bare, depth) {
606
422
  function walkError(err, state, fullPath, bare, depth) {
607
423
  let serialized;
608
424
  try {
609
- serialized = serializeError(err);
425
+ serialized = require_error_utils.serializeError(err);
610
426
  } catch {
611
427
  return {
612
428
  name: err.name,
@@ -1125,6 +941,26 @@ function nowIso() {
1125
941
  }
1126
942
  const RESOLVED = Promise.resolve();
1127
943
  const UNSERIALIZABLE = "[Unserializable]";
944
+ const ANSI_COLORS = /* @__PURE__ */ new Map([
945
+ ["black", "\x1B[30m"],
946
+ ["red", "\x1B[31m"],
947
+ ["green", "\x1B[32m"],
948
+ ["yellow", "\x1B[33m"],
949
+ ["blue", "\x1B[34m"],
950
+ ["magenta", "\x1B[35m"],
951
+ ["cyan", "\x1B[36m"],
952
+ ["white", "\x1B[37m"],
953
+ ["gray", "\x1B[90m"],
954
+ ["grey", "\x1B[90m"],
955
+ ["brightred", "\x1B[91m"],
956
+ ["brightgreen", "\x1B[92m"],
957
+ ["brightyellow", "\x1B[93m"],
958
+ ["brightblue", "\x1B[94m"],
959
+ ["brightmagenta", "\x1B[95m"],
960
+ ["brightcyan", "\x1B[96m"],
961
+ ["brightwhite", "\x1B[97m"],
962
+ ["reset", "\x1B[0m"]
963
+ ]);
1128
964
  const JSON_STRING_FIELDS = [
1129
965
  "timestamp",
1130
966
  "level",
@@ -1163,7 +999,7 @@ function toContextLabel(context) {
1163
999
  }
1164
1000
  function serializeErrorSafely(error) {
1165
1001
  try {
1166
- return serializeError(error);
1002
+ return require_error_utils.serializeError(error);
1167
1003
  } catch (cause) {
1168
1004
  require_internal_log.internalError("Error serialization failed", cause);
1169
1005
  return UNSERIALIZABLE;
@@ -1261,7 +1097,7 @@ var LogixiaLogger = class LogixiaLogger {
1261
1097
  /** `source=value` pairs already reported as unknown levels — warn once per logger. */
1262
1098
  _warnedInvalidLevels = /* @__PURE__ */ new Set();
1263
1099
  /** Pre-built ANSI color codes to avoid recreating the object in colorize(). */
1264
- _colorMap = /* @__PURE__ */ new Map();
1100
+ _colorMap = ANSI_COLORS;
1265
1101
  /** Pre-computed field-enabled booleans so isFieldEnabled() isn't called per log. */
1266
1102
  _fieldCache = /* @__PURE__ */ new Map();
1267
1103
  /** True when contextData is non-empty — avoids Object.keys() check on hot path. */
@@ -1333,15 +1169,21 @@ var LogixiaLogger = class LogixiaLogger {
1333
1169
  }
1334
1170
  }
1335
1171
  };
1336
- this.config = {
1337
- ...defaultConfig,
1338
- ...config
1339
- };
1340
- const resolvedLevel = resolveInitialLevel(this.config);
1341
- this.config.levelOptions = {
1342
- ...this.config.levelOptions,
1343
- level: resolvedLevel
1172
+ if (parent) this.config = {
1173
+ ...config,
1174
+ levelOptions: { ...config.levelOptions }
1344
1175
  };
1176
+ else {
1177
+ this.config = {
1178
+ ...defaultConfig,
1179
+ ...config
1180
+ };
1181
+ const resolvedLevel = resolveInitialLevel(this.config);
1182
+ this.config.levelOptions = {
1183
+ ...this.config.levelOptions,
1184
+ level: resolvedLevel
1185
+ };
1186
+ }
1345
1187
  this.config.fields ??= {
1346
1188
  timestamp: "[yyyy-mm-dd HH:MM:ss.MS]",
1347
1189
  level: "[log_level]",
@@ -1376,7 +1218,7 @@ var LogixiaLogger = class LogixiaLogger {
1376
1218
  if (!parent) this.setupGracefulShutdown();
1377
1219
  this.createCustomLevelMethods();
1378
1220
  if (!parent) for (const p of globalPluginRegistry._plugins) this._pluginRegistry.register(p);
1379
- this._buildPerfCaches();
1221
+ this._buildPerfCaches(parent);
1380
1222
  }
1381
1223
  setupGracefulShutdown() {
1382
1224
  const shutdownCfg = this.config.gracefulShutdown;
@@ -1407,8 +1249,17 @@ var LogixiaLogger = class LogixiaLogger {
1407
1249
  * Rebuild all hot-path caches after any config mutation or level change.
1408
1250
  * Keeps the actual log() call free of allocations in the common case.
1409
1251
  */
1410
- _buildPerfCaches() {
1252
+ _buildPerfCaches(inheritFrom) {
1411
1253
  var _this$config$levelOpt4, _this$config$format, _this$config$redact$p, _this$config$redact$p2;
1254
+ if (inheritFrom && inheritFrom.fieldState.size === 0) {
1255
+ this._levelValues = inheritFrom._levelValues;
1256
+ this._fieldCache = new Map(inheritFrom._fieldCache);
1257
+ this._formattedLevels = inheritFrom._formattedLevels;
1258
+ this._formattedAppName = inheritFrom._formattedAppName;
1259
+ this._hasRedact = inheritFrom._hasRedact;
1260
+ this._minLevelValue = this._levelValues.get(this.resolveEffectiveLevel()) ?? 2;
1261
+ return;
1262
+ }
1412
1263
  const customLevelEntries = Object.entries(((_this$config$levelOpt4 = this.config.levelOptions) === null || _this$config$levelOpt4 === void 0 ? void 0 : _this$config$levelOpt4.levels) ?? {});
1413
1264
  this._levelValues = new Map([
1414
1265
  [LogLevel.ERROR, 0],
@@ -1423,26 +1274,7 @@ var LogixiaLogger = class LogixiaLogger {
1423
1274
  this.config.levelOptions.level = this._validLevel(this.config.levelOptions.level, "levelOptions.level") ?? LogLevel.INFO;
1424
1275
  const effectiveLevel = this.resolveEffectiveLevel();
1425
1276
  this._minLevelValue = this._levelValues.get(effectiveLevel) ?? 2;
1426
- this._colorMap = /* @__PURE__ */ new Map([
1427
- ["black", "\x1B[30m"],
1428
- ["red", "\x1B[31m"],
1429
- ["green", "\x1B[32m"],
1430
- ["yellow", "\x1B[33m"],
1431
- ["blue", "\x1B[34m"],
1432
- ["magenta", "\x1B[35m"],
1433
- ["cyan", "\x1B[36m"],
1434
- ["white", "\x1B[37m"],
1435
- ["gray", "\x1B[90m"],
1436
- ["grey", "\x1B[90m"],
1437
- ["brightred", "\x1B[91m"],
1438
- ["brightgreen", "\x1B[92m"],
1439
- ["brightyellow", "\x1B[93m"],
1440
- ["brightblue", "\x1B[94m"],
1441
- ["brightmagenta", "\x1B[95m"],
1442
- ["brightcyan", "\x1B[96m"],
1443
- ["brightwhite", "\x1B[97m"],
1444
- ["reset", "\x1B[0m"]
1445
- ]);
1277
+ this._colorMap = ANSI_COLORS;
1446
1278
  for (const f of [
1447
1279
  "timestamp",
1448
1280
  "level",
@@ -1504,7 +1336,7 @@ var LogixiaLogger = class LogixiaLogger {
1504
1336
  */
1505
1337
  error(messageOrError, data) {
1506
1338
  try {
1507
- return isError(messageOrError) ? this._run("error", errorMessageSafely(messageOrError), {
1339
+ return require_error_utils.isError(messageOrError) ? this._run("error", errorMessageSafely(messageOrError), {
1508
1340
  ...data,
1509
1341
  error: serializeErrorSafely(messageOrError)
1510
1342
  }) : this._run("error", messageOrError, data);
@@ -1891,7 +1723,7 @@ var LogixiaLogger = class LogixiaLogger {
1891
1723
  ...mergedData
1892
1724
  } : mergedData;
1893
1725
  if (rawPayload) try {
1894
- rawPayload = serializeNestedErrors(rawPayload);
1726
+ rawPayload = require_error_utils.serializeNestedErrors(rawPayload);
1895
1727
  } catch (error) {
1896
1728
  require_internal_log.internalError("Error serialization failed", error);
1897
1729
  }
@@ -2424,24 +2256,12 @@ Object.defineProperty(exports, "globalPluginRegistry", {
2424
2256
  return globalPluginRegistry;
2425
2257
  }
2426
2258
  });
2427
- Object.defineProperty(exports, "isError", {
2428
- enumerable: true,
2429
- get: function() {
2430
- return isError;
2431
- }
2432
- });
2433
2259
  Object.defineProperty(exports, "isLogixiaException", {
2434
2260
  enumerable: true,
2435
2261
  get: function() {
2436
2262
  return isLogixiaException;
2437
2263
  }
2438
2264
  });
2439
- Object.defineProperty(exports, "normalizeError", {
2440
- enumerable: true,
2441
- get: function() {
2442
- return normalizeError;
2443
- }
2444
- });
2445
2265
  Object.defineProperty(exports, "redactObject", {
2446
2266
  enumerable: true,
2447
2267
  get: function() {
@@ -2460,18 +2280,6 @@ Object.defineProperty(exports, "resetShutdownHandlers", {
2460
2280
  return resetShutdownHandlers;
2461
2281
  }
2462
2282
  });
2463
- Object.defineProperty(exports, "serializeError", {
2464
- enumerable: true,
2465
- get: function() {
2466
- return serializeError;
2467
- }
2468
- });
2469
- Object.defineProperty(exports, "serializeNestedErrors", {
2470
- enumerable: true,
2471
- get: function() {
2472
- return serializeNestedErrors;
2473
- }
2474
- });
2475
2283
  Object.defineProperty(exports, "usePlugin", {
2476
2284
  enumerable: true,
2477
2285
  get: function() {
@@ -2479,4 +2287,4 @@ Object.defineProperty(exports, "usePlugin", {
2479
2287
  }
2480
2288
  });
2481
2289
 
2482
- //# sourceMappingURL=builder-jMlVYaQa.js.map
2290
+ //# sourceMappingURL=builder-Ck1tsC5d.js.map