Most developers quickly realize that being notified of errors within their applications as soon as they happen is a great way to proactively fix problems. This approach has a few benefits. First, the developer does not have to spend time each day scouring logs looking for errors, and then trying to recreate the state of the system at that time to determine what happened. Secondly, the admin can actually call the end user almost immediately after being notified of the error, making them seem omniscient. Imagine being able to call your users as they are encountering the error. They will literally think you are superhuman and be amazed that you knew they needed help.

So how do we do this? Fortunately, if you are developing your application in the java programming language, most of the hard stuff is already done if you use the Apache Log4j logging framework. continue reading…