{"repo":"ehmicky/log-process-errors","free":true,"listed":false,"github":"https://github.com/ehmicky/log-process-errors","clone":"git clone https://github.com/ehmicky/log-process-errors.git","description":"Show some ❤️ to Node.js process errors","language":"JavaScript","stars":468,"topics":["process","error-handling","error-handler","error","handling","handler","exception","promise","logging","uncaught"],"license":"Apache-2.0","category":"dev-tools","readme_excerpt":"📰 Medium article. Show some ❤️ to Node.js process errors. This improves process errors: uncaught exceptions, unhandled promises, promises handled too late and warnings. Features - Stack traces for warnings and rejectionHandled - Single event handler for all process errors - Ignore duplicate process errors - Normalize invalid errors - Process exit is graceful and can be prevented Install Production code (e.g. a server) can install this either as a production or development dependency: However, libraries should install this as a development dependency: This is because logging is modified globally and libraries users might not expect this side-effect. Also, this might lead to conflicts between libraries. This package works in Node.js =18.18.0. This is an ES module. It must be loaded using an import or import() statement, not require() . If TypeScript is used, it must be configured to output ES modules, not CommonJS. API logProcessErrors(options?) options object? \\ Return value : () = void Start handling process errors. The return value restores Node.js default behavior. Options exit Type : boolean Whether to exit the process on uncaught exceptions or unhandled promises. This is false by default if other libraries are listening to those events, so they can perform the exit instead. Otherwise, this is true . If some tasks are still ongoing, the exit waits for them to complete up to 3 seconds. onError Type : (error, event) = Promise void \\ Default : console.error(error) Function c","default_branch":null,"files":null,"tree":[],"storefront":"/r/ehmicky","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ehmicky/log-process-errors/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}