Automatic Java Error Reporting Systems

 ̄綄美尐妖づ 提交于 2019-12-09 16:36:03

问题


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.


回答1:


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.




回答2:


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.

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.




回答3:


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.




回答4:


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.



来源:https://stackoverflow.com/questions/202345/automatic-java-error-reporting-systems

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!