Skip to content

Commit

Permalink
feat: customize pino to use utc time, remove pid & hostname and use l…
Browse files Browse the repository at this point in the history
…abel level

Signed-off-by: iverly <github@iverly.net>
  • Loading branch information
iverly committed Nov 28, 2023
1 parent ab1c000 commit 3e6a3ad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/opentelemetry/src/lib/opentelemetry.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ export class OpenTelemetryModule {
ConfigModule.forFeature(config),
LoggerModule.forRoot({
pinoHttp: {
base: null,
formatters: {
level: (label: string) => ({ level: label }),
},
timestamp: () => `,"time":"${new Date().toISOString()}"`,
redact: {
paths: ['req.headers.authorization', 'req.headers.cookie'],
},
Expand Down

0 comments on commit 3e6a3ad

Please sign in to comment.