Skip to content

Commit

Permalink
fix: updated logger not to exit after logging an uncaughtException (#7)
Browse files Browse the repository at this point in the history
Co-authored-by: Aman Jain (ECS/DEL) <[email protected]>
  • Loading branch information
amanjain14 and jainaman1497 authored Sep 22, 2022
1 parent b809dd2 commit da283a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "logger-safe-security",
"version": "1.1.3",
"version": "1.1.4",
"description": "Custom logging framework used in SAFE",
"main": "lib/index.js",
"types": "lib",
Expand Down
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ export const createLogger = (
})
],

// do not exit the process after logging an uncaughtException
exitOnError: false,

// generic metadata applied to all logs
defaultMeta: { type: "application", ...(service && { service }) }
});

0 comments on commit da283a1

Please sign in to comment.