@bgord/bun 1.4.10 → 1.4.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/package.json
CHANGED
|
@@ -10,19 +10,19 @@ export class LoggerWinstonLocalAdapter {
|
|
|
10
10
|
constructor(private readonly config: LoggerWinstonLocalAdapterConfigType) {}
|
|
11
11
|
|
|
12
12
|
create(level: LogLevelEnum): LoggerPort {
|
|
13
|
+
const coloredConsoleTransport = new winston.transports.Console({
|
|
14
|
+
format: winston.format.combine(
|
|
15
|
+
winston.format.colorize({ all: true }),
|
|
16
|
+
winston.format.printf((info) => JSON.stringify(info, null, 2)),
|
|
17
|
+
),
|
|
18
|
+
});
|
|
19
|
+
|
|
13
20
|
return new LoggerWinstonAdapter({
|
|
14
21
|
app: this.config.app,
|
|
15
22
|
environment: NodeEnvironmentEnum.local,
|
|
16
23
|
level,
|
|
17
24
|
redactor: this.config.redactor,
|
|
18
|
-
transports: [
|
|
19
|
-
new winston.transports.Console({
|
|
20
|
-
format: winston.format.combine(
|
|
21
|
-
winston.format.colorize({ all: true }),
|
|
22
|
-
winston.format.prettyPrint(),
|
|
23
|
-
),
|
|
24
|
-
}),
|
|
25
|
-
],
|
|
25
|
+
transports: [coloredConsoleTransport],
|
|
26
26
|
formats: [],
|
|
27
27
|
filePath: null,
|
|
28
28
|
});
|