3

I'm working with multiple software with varying ways of monitoring for errors. When I make software, I usually send email with the stack trace to admins(usually me). Some customer software is monitored by a team who check that a particular batch run was successfull. Other software might not have any monitoring at all(someone will call when things go wrong horribly).

Sending emails is good, except when things start going wrong, my mail gets filled fast. Also I don't want to solve the same problem in code for every software. Is there some relatively cheap and low maintenance software or practice to handle this. I want it to be cheap/low maintenance because usually I work alone or in teams of 5 or smaller. For example it would be great if errors would be aggregated so I don't get 10 000 emails when something unexpected happens...

For clarification: By unhandled errors I mean Exceptions that were unhandled by application code that were propagated to Tomcat or Jboss. I don't need help with how to catch those errors. I need help with what to do with them.

Is there any cloud application that I could send my errors to? Or some simple server to install? Or some library that can handle errors using configuration files. I use Java if that is any help.

1
  • Send it to a gmail account? Plenty of space there plus filters.
    – user1249
    Jun 12, 2012 at 11:23

3 Answers 3

2

You have options...


  • Implement you own log4j/logback appender (WriteYourOwnAppender) that "does what you want"

  • Use an SMTPAppender that accumulates logging events in one or more fixed-size buffers and sends the contents of the appropriate buffer in an email after a user-specified event occurs

  • Use a DBAppender that inserts logging events into three database tables in a format independent of the Java programming language

  • Use a SocketAppender that is designed to log to a remote entity by transmitting serialized ILoggingEvent instances over the wire. You would have to take care of the receiving side of course.

  • Use a SyslogAppender a that sends a small message to a syslog receiver. The receiver is commonly called syslog daemon or syslog server. Logback can send messages to a remote syslog daemon. In short, it will send all your exceptions (errors, warnings, depending how you configure it in logback.properties/xml) to an OS syslog.

  • Or, there is Bug4J, that you can either use via Bug4jAppender or through the Bug4J agent. Both will write into a Bug4J server which has a web gui that looks a bit nicer than ChainSaw (which, btw, is another way..):

enter image description here

1
  • You saved the best for last. I don't want to implement my own exception logging GUI's so this might help.
    – palto
    Jun 14, 2012 at 6:04
3

Have you tried slf4j + logback logging to a central syslog server with Logback's SyslogAppender?

From there you can use the syslog tools to analyze the messages and send an email to you if necessary.

1
  • I haven't used "syslog tools" before. I know what syslog is but I have no idea what tools there are for using it other than grepping it for error messages manually.
    – palto
    Jun 12, 2012 at 13:45
0

I've only built my own aggregating service for this type of problem in the past. Basically only passing on a notification every x occurrences in y timeframe. Perhaps you can implement a similar simple solution for the apps that you deliver.

1
  • I'm actually considering creating a service like this myself, but I wanted to make sure that there are not many other services like this. I just feel that this is such a common problem that someone would have solved it already...
    – palto
    Jun 12, 2012 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.