Tag: raygun raygun.io

在使用Raygun的快递处理程序后,如何closures我的stream程?

我正在用NodeJS和Express构build一个应用程序,最近还join了Raygun的error handling。 Raygun提供了一个专门用于Express的error handling程序,但它必须是运行的最后一个中间件。 现在我有: //Log the domain id, req, and error to the console app.use(function errorHandler(err, req, res, next) { console.log('error on request %d %s %s: %s', process.domain.id, req.method, req.url, err) next(err) }) //Log the error to Raygun //!Must be last piece of middleware to be defined app.use(raygunClient.expressHandler); 但问题是服务器继续运行,可能会使应用程序处于未知状态。 我想做一个优雅的服务器关机,但如果我添加 //Shuts down the process […]