Search in sources :

Example 16 with RollingFileAppender

use of org.apache.log4j.RollingFileAppender in project dhis2-core by dhis2.

the class Log4JLogConfigInitializer method configureRootLogger.

/**
     * Configures a root file logger.
     * 
     * @param filename the filename to output logging to.
     */
private void configureRootLogger(String filename) {
    String file = getLogFile(filename);
    RollingFileAppender appender = getRollingFileAppender(file);
    Logger.getRootLogger().addAppender(appender);
    log.info("Added root logger using file: " + file);
}
Also used : RollingFileAppender(org.apache.log4j.RollingFileAppender)

Aggregations

RollingFileAppender (org.apache.log4j.RollingFileAppender)16 PatternLayout (org.apache.log4j.PatternLayout)8 Logger (org.apache.log4j.Logger)6 File (java.io.File)4 IOException (java.io.IOException)4 IgniteLogger (org.apache.ignite.IgniteLogger)3 GridTestLog4jLogger (org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger)3 ConsoleAppender (org.apache.log4j.ConsoleAppender)3 Log4JLogger (org.apache.commons.logging.impl.Log4JLogger)2 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)2 Appender (org.apache.log4j.Appender)2 LevelRangeFilter (org.apache.log4j.varia.LevelRangeFilter)2 Test (org.junit.Test)2 RandomAccessFile (java.io.RandomAccessFile)1 NullLogger (org.apache.ignite.logger.NullLogger)1 FileAppender (org.apache.log4j.FileAppender)1 BeforeClass (org.junit.BeforeClass)1 Logger (org.slf4j.Logger)1