5.6. Logging

The platform uses Apache Log4j version 1.2 for logging.

We recommend using logging via the Commons Logging API and getting a logger based on the current class name. Example of creating a logger and writing to it:

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class ...

    private Log log = LogFactory.getLog(getClass()); // create logger

    private void someMethod() {
        log.debug("someMethod invoked"); // output message with DEBUG level
    }

Logs for the Middleware, Web Client and Web Portal blocks are configured at the application server level; in fast deployment mode the server is Tomcat. Logs for the Desktop Client block are configured separately.