Skip to content

Commit

Permalink
quick fix pino log
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhdanh27600 committed Sep 21, 2023
1 parent 8e02978 commit 81edf23
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/utils/loggerServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ module.exports = isTest
},
timestamp: pino.stdTimeFunctions.isoTime,
},
pino.transport({
target: 'pino/file',
options: { destination: isProduction ? `pino.log` : `./logs/pino.log` },
}),
isProduction
? pino.transport({
target: 'pino/file',
options: { destination: `pino.log` },
})
: undefined,
);

0 comments on commit 81edf23

Please sign in to comment.