Skip to content

Commit

Permalink
Merge pull request #61 from oceanprotocol/fix-exceptions-log-folder
Browse files Browse the repository at this point in the history
fix exceptions log folder missing (going to root)
  • Loading branch information
paulo-ocean authored Oct 20, 2023
2 parents 82cbe6e + 8bd64c8 commit e2aa6ea
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/utils/logging/Logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ function getDefaultOptions(): winston.LoggerOptions {
levels: LOG_LEVELS_NUM,
format,
transports: defaultTransports,
exceptionHandlers: [new winston.transports.File({ filename: 'exceptions.log' })]
exceptionHandlers: [
new winston.transports.File({ dirname: 'logs/', filename: EXCEPTIONS_HANDLER })
]
}
}

Expand Down Expand Up @@ -379,7 +381,8 @@ export function getCustomLoggerForModule(
],
exceptionHandlers: [
new winston.transports.File({
filename: moduleOrComponentName + '_exceptions.log'
dirname: 'logs/',
filename: moduleOrComponentName + '_' + EXCEPTIONS_HANDLER
})
]
}
Expand Down

0 comments on commit e2aa6ea

Please sign in to comment.