Skip to content

Commit

Permalink
Add colorized log to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
holzmaster committed Dec 14, 2024
1 parent e2d12f9 commit 303ed89
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/utils/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,23 @@ const loggingConfigs = {
},
production: {
level: logLevel,

transport: {
target: "pino/file",
options: {
destination: `${logDir}/error.log`,
},
targets: [
{
target: "pino-pretty",
options: {
colorize: true,
ignore: "pid,hostname",
},
},
{
target: "pino/file",
options: {
destination: `${logDir}/error.log`,
},
},
],
},
},
} as Record<string, LoggerOptions>;
Expand Down

0 comments on commit 303ed89

Please sign in to comment.