Skip to content

Commit

Permalink
Configure pino to create the log file directory if it does not exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreachild committed Oct 21, 2024
1 parent 8800cba commit 795da62
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function loggerInit(directory, quiet = false, logLevel = 'info') {
target: 'pino-pretty',
options: {
destination: logFileDestination,
mkdir: true,
colorize: false,
translateTime: 'yyyy-mm-dd HH:MM:ss',
ignore: 'pid,hostname'
Expand Down

0 comments on commit 795da62

Please sign in to comment.