In comparison to the java.util.logging we don’t must do any setup. By default, Log4j two will make use of the ConsoleAppender to put in writing the log information towards the console. The log record will likely be printed utilizing the PatternLayout hooked up towards the outlined ConsoleAppander Using the pattern defined as follows: %d HH:mm:ss.