LOG4J allows one to insert logging statements into a Java program which are left in at compile time. The log statements can be controlled via XML files so that only logging statements of a certain priority will be output or the logging can be turned of completely.