@ccci/micro-server 1.0.42 → 1.0.44
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.js +7 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -87519,10 +87519,15 @@ import fs from "fs";
|
|
|
87519
87519
|
|
|
87520
87520
|
// src/utils/Logger.ts
|
|
87521
87521
|
var import_winston = __toESM(require_winston(), 1);
|
|
87522
|
-
var { combine, timestamp, errors, cli, splat } = import_winston.default.format;
|
|
87522
|
+
var { combine, timestamp, errors, cli, splat, printf, colorize } = import_winston.default.format;
|
|
87523
87523
|
var logger = import_winston.default.createLogger({
|
|
87524
87524
|
level: "info",
|
|
87525
|
-
format: combine(errors({ stack: true }), timestamp(),
|
|
87525
|
+
format: combine(errors({ stack: true }), timestamp(), colorize(), splat(), printf((info) => {
|
|
87526
|
+
if (typeof info.message === "object") {
|
|
87527
|
+
info.message = JSON.stringify(info.message, null, 3);
|
|
87528
|
+
}
|
|
87529
|
+
return `${info.timestamp} - [${info.level}]: ${info.message} ${JSON.stringify(info.metadata)}`;
|
|
87530
|
+
})),
|
|
87526
87531
|
transports: [new import_winston.default.transports.Console]
|
|
87527
87532
|
});
|
|
87528
87533
|
|