自动 Java 错误报告系统
有谁知道java中的自动错误报告系统吗? 我们有一个安装在客户端服务器上的服务器产品。 我们的想法是,我们的服务器会打电话回家,将错误的详细信息发送到我们的一台服务器,然后将错误输入到我们的错误跟踪器中。 最好是通过 http 进行。 并非所有异常都会发生这种情况,只会发生更严重的异常和任何未以其他方式处理的异常。
我试图避免自己滚动。 我们将自己捕获异常,但我希望这个系统能够在异常处理程序和错误跟踪器之间尽可能多地进行处理。
Does anyone know of a system for automatic error reporting in java? We have a server product that is installed on client servers. The idea is that our server would phone home with the details of an error to one of our servers, which then enters a bug in our bug tracker. Preferable, this would happen over http. It wouldn't happen for all exceptions, just the more serious and any that are not otherwise handled.
I'm trying to avoid rolling my own. We'll catch the exceptions ourselves, but I'm hoping this system would handle as much as possible between exception handler and the bug tracker back home.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
不传统,但也许您可以使用 Log4J 附加程序来执行此操作。
SocketAppender 允许您发送发送到远程日志服务器的事件。 您还可以使用 SMTPAppender 通过邮件进行通信(有点棘手但易于实现)。 我不知道是否有任何其他附加程序通过 HTTP 与服务器通信(如果需要,您甚至可以实现它,我认为这非常简单)。
让我们看看 stackoverflow 上的其他用户是否有更好的想法。
Not conventional, but maybe you could use Log4J appenders to do it.
The SocketAppender allows you to send an event to a remote a log server. You can also communicate via mail using SMTPAppender (a little tricky but easy to implement). I don't know if there is any other appender to communicate with the server via HTTP (you could even implement it if needed, I suppose it is pretty easy).
Lets see if other users at stackoverflow have a better idea.
看看 Ctrlflow 自动错误报告,这是一个相当新的错误报告工具。 它针对 Java 和 Eclipse/OSGI 进行了优化,并附带多个客户端(对于您的服务器产品,Logback 或 Log4J 客户端可能是一个不错的选择),它将错误报告发送到中央服务器。
然后服务器会自动过滤并聚合
传入的错误报告。 服务器与您的错误跟踪器同步,并可以自动打开新的错误。 它还提供定期发送给开发人员的仪表板和摘要邮件。
对于小型项目来说它是免费的。
Have a look at Ctrlflow Automated Error Reporting, which is a fairly new error reporting tool. It is optimized for Java and Eclipse/OSGI and comes with several clients (for your server product the Logback or Log4J client would likely be a good fit), which send error reports home to a central server.
The server then automatically filters and aggregates the
incoming error reports. The server synchronizes itself with your bug tracker and can automatically open new bugs. It also offers dashboards and digest mails sent at regular intervals to your developers.
And its free for small projects.
查看 SNMP4J。 有很多系统管理工具可以聚合 SNMP 信息(询问您的系统管理员),以及简单网络管理协议是为监控而设计的。
如果您只需要将错误邮件发送给您,您也可以使用 JavaMail 构建自己的框架; 它并不那么复杂,样板代码可以放在您的业务逻辑之外。
也许您的错误跟踪系统允许 Soap/XML 消息; 那么 Axis 会是一个不错的选择,尽管它有很多依赖项。
Have a look at SNMP4J. There are quite a lot of system administration tools to aggregate SNMP infomation (ask your systems administrator), and the Simple Network Management Protocol is designed for monitoring.
If you only need errors to be mailed to you you can also build your own framework with JavaMail; it is not that complicated and the boiler plate code can be put outside your business logic.
Maybe your bug tracking systems allows Soap/XML messages; then Axis would be a good fit, although it comes with quite a few dependencies.
你可以看看 https://github.com/kencochrane/raven-java 这可以坐在log4j 并向 Sentry(请参阅 http://sentry.readthedocs.org/)实例报告错误。 Sentry有很多功能,请看一下。
You might look at https://github.com/kencochrane/raven-java This can sit on log4j and report errors to a Sentry (see http://sentry.readthedocs.org/) instance. Sentry has lot's of features, please have a look.