Aggregating Error Logs to Send a Warning Email When Too Many of Them – Log4j, Stat4j, SMTPAppender

Our development team wanted to get notified as soon as something goes wrong in our production system, a critical Java web application serving thousands of customers daily. The idea was to let it send us an email when there are too many errors, indicating usually a problem with a database, an external web service, orContinue reading “Aggregating Error Logs to Send a Warning Email When Too Many of Them – Log4j, Stat4j, SMTPAppender”

Troubleshooting logging configuration (Log4j, commons-logging)

Did it ever happen to you that your logging didn’t behave as expected? Here are some tips how to find out what’s going on. Commons-logging (since 1.1) Set the system property org.apache.commons.logging.diagnostics.dest to STDOUT (or STDERR or a file name); docs: -Dorg.apache.commons.logging.diagnostics.dest=STDOUT Extract of a sample output (no commons-logging.properties): Extract of a sample output (incorrectContinue reading “Troubleshooting logging configuration (Log4j, commons-logging)”