Skip to content

Commit cccc370

Browse files
authored
Merge pull request #35 from Bit-Quill/achild/createLogFileIfNotExists
Configure pino to create the log file directory if it does not exist.
2 parents 8800cba + 795da62 commit cccc370

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/logger.js

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ function loggerInit(directory, quiet = false, logLevel = 'info') {
1818
target: 'pino-pretty',
1919
options: {
2020
destination: logFileDestination,
21+
mkdir: true,
2122
colorize: false,
2223
translateTime: 'yyyy-mm-dd HH:MM:ss',
2324
ignore: 'pid,hostname'

0 commit comments

Comments
 (0)