Skip to content

Commit

Permalink
Fix read ECONRESET error hapijs#145
Browse files Browse the repository at this point in the history
  • Loading branch information
aaestrada committed Nov 24, 2021
1 parent 204c96e commit 42e637d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions index.js
Expand Up @@ -117,10 +117,12 @@ async function register (server, options) {
})

server.events.on('log', function (event) {
if (event.error) {
logger.error({ err: event.error })
} else if (!isCustomTagsLoggingIgnored(event, ignoredEventTags.log)) {
logEvent(logger, event)
if (!isCustomTagsLoggingIgnored(event, ignoredEventTags.log)) { // first check on ignoring tags
if (event.error) {
logger.error({ err: event.error })
} else {
logEvent(logger, event)
}
}
})

Expand Down

0 comments on commit 42e637d

Please sign in to comment.