Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question
    
Send it to a gmail account? Plenty of space there plus filters. –  user1249 Jun 12 '12 at 11:23
add comment

3 Answers 3

up vote 2 down vote accepted

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

share|improve this answer
    
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 '12 at 6:04
add comment

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.

share|improve this answer
    
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 '12 at 13:45
add comment

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.

share|improve this answer
    
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 '12 at 13:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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