Package org.apache.log4j.rolling

Examples of org.apache.log4j.rolling.RollingFileAppender$DefaultErrorHandler


      TimeBasedRollingPolicy rollingPolicy = new TimeBasedRollingPolicy();
      File logDir = new File(gs.getAtlasDir(), "logs");
      rollingPolicy.setFileNamePattern(logDir.getAbsolutePath()+"/nunaliit.%d.gz");
      rollingPolicy.activateOptions();
     
      RollingFileAppender fileAppender = new RollingFileAppender();
      fileAppender.setRollingPolicy(rollingPolicy);
      fileAppender.setTriggeringPolicy(rollingPolicy);
      fileAppender.setLayout(new PatternLayout("%d{ISO8601}[%-5p]: %m%n"));
      fileAppender.activateOptions();
     
      rootLogger.addAppender(fileAppender);
    }

    // Capture java.util.Logger
View Full Code Here


      TimeBasedRollingPolicy rollingPolicy = new TimeBasedRollingPolicy();
      File logDir = new File(gs.getAtlasDir(), "logs");
      rollingPolicy.setFileNamePattern(logDir.getAbsolutePath()+"/nunaliit.%d.gz");
      rollingPolicy.activateOptions();
     
      RollingFileAppender fileAppender = new RollingFileAppender();
      fileAppender.setRollingPolicy(rollingPolicy);
      fileAppender.setTriggeringPolicy(rollingPolicy);
      fileAppender.setLayout(new PatternLayout("%d{ISO8601}[%-5p]: %m%n"));
      fileAppender.activateOptions();
     
      rootLogger.addAppender(fileAppender);
    }

    // Capture java.util.Logger
View Full Code Here

        String pattern = fullFilePathAndPrefix + "-" + value + "-%d{"
            + datePattern + "}";

        tbrp.setFileNamePattern(pattern);
        tbrp.activateOptions();
        RollingFileAppender rfa = new RollingFileAppender();
        rfa.setRollingPolicy(tbrp);
        rfa.activateOptions();
        return rfa;

      }

    };
View Full Code Here

    TimeBasedRollingPolicy statusesRollingPolicy = new TimeBasedRollingPolicy();
    statusesRollingPolicy.setFileNamePattern("statuses.log" + HOUR_ROLL);
    statusesRollingPolicy.activateOptions();

    RollingFileAppender statusesAppender = new RollingFileAppender();
    statusesAppender.setRollingPolicy(statusesRollingPolicy);
    statusesAppender.addFilter(filter);
    statusesAppender.setLayout(layoutSimple);
    statusesAppender.activateOptions();

    TimeBasedRollingPolicy warningsRollingPolicy = new TimeBasedRollingPolicy();
    warningsRollingPolicy.setFileNamePattern("warnings.log" + HOUR_ROLL);
    warningsRollingPolicy.activateOptions();

    RollingFileAppender warningsAppender = new RollingFileAppender();
    warningsAppender.setRollingPolicy(statusesRollingPolicy);
    warningsAppender.setThreshold(Level.WARN);
    warningsAppender.setLayout(layoutStandard);
    warningsAppender.activateOptions();

    ConsoleAppender consoleAppender = new ConsoleAppender();
    consoleAppender.setThreshold(Level.WARN);
    consoleAppender.setLayout(layoutStandard);
    consoleAppender.activateOptions();
View Full Code Here

      TimeBasedRollingPolicy rollingPolicy = new TimeBasedRollingPolicy();
      File logDir = new File(gs.getAtlasDir(), "logs");
      rollingPolicy.setFileNamePattern(logDir.getAbsolutePath()+"/nunaliit.%d.gz");
      rollingPolicy.activateOptions();
     
      RollingFileAppender fileAppender = new RollingFileAppender();
      fileAppender.setRollingPolicy(rollingPolicy);
      fileAppender.setTriggeringPolicy(rollingPolicy);
      fileAppender.setLayout(new PatternLayout("%d{ISO8601}[%-5p]: %m%n"));
      fileAppender.activateOptions();
     
      rootLogger.addAppender(fileAppender);
    }

    // Capture java.util.Logger
View Full Code Here

      TimeBasedRollingPolicy rollingPolicy = new TimeBasedRollingPolicy();
      File logDir = new File(gs.getAtlasDir(), "logs");
      rollingPolicy.setFileNamePattern(logDir.getAbsolutePath()+"/nunaliit.%d.gz");
      rollingPolicy.activateOptions();
     
      RollingFileAppender fileAppender = new RollingFileAppender();
      fileAppender.setRollingPolicy(rollingPolicy);
      fileAppender.setTriggeringPolicy(rollingPolicy);
      fileAppender.setLayout(new PatternLayout("%-5p [%t]: %m%n"));
      fileAppender.activateOptions();
     
      rootLogger.addAppender(fileAppender);
    }
   
    // Verify that connection to the database is available
View Full Code Here

      TimeBasedRollingPolicy rollingPolicy = new TimeBasedRollingPolicy();
      File logDir = new File(gs.getAtlasDir(), "logs");
      rollingPolicy.setFileNamePattern(logDir.getAbsolutePath()+"/nunaliit.%d.gz");
      rollingPolicy.activateOptions();
     
      RollingFileAppender fileAppender = new RollingFileAppender();
      fileAppender.setRollingPolicy(rollingPolicy);
      fileAppender.setTriggeringPolicy(rollingPolicy);
      fileAppender.setLayout(new PatternLayout("%d{ISO8601}[%-5p]: %m%n"));
      fileAppender.activateOptions();
     
      rootLogger.addAppender(fileAppender);
    }

    // Capture java.util.Logger
View Full Code Here

      TimeBasedRollingPolicy rollingPolicy = new TimeBasedRollingPolicy();
      File logDir = new File(gs.getAtlasDir(), "logs");
      rollingPolicy.setFileNamePattern(logDir.getAbsolutePath()+"/nunaliit.%d.gz");
      rollingPolicy.activateOptions();
     
      RollingFileAppender fileAppender = new RollingFileAppender();
      fileAppender.setRollingPolicy(rollingPolicy);
      fileAppender.setTriggeringPolicy(rollingPolicy);
      fileAppender.setLayout(new PatternLayout("%d{ISO8601}[%-5p]: %m%n"));
      fileAppender.activateOptions();
     
      rootLogger.addAppender(fileAppender);
    }

    // Capture java.util.Logger
View Full Code Here

    TimeBasedRollingPolicy statusesRollingPolicy = new TimeBasedRollingPolicy();
    statusesRollingPolicy.setFileNamePattern("statuses.log" + HOUR_ROLL);
    statusesRollingPolicy.activateOptions();

    RollingFileAppender statusesAppender = new RollingFileAppender();
    statusesAppender.setRollingPolicy(statusesRollingPolicy);
    statusesAppender.addFilter(filter);
    statusesAppender.setLayout(layoutSimple);
    statusesAppender.activateOptions();

    TimeBasedRollingPolicy warningsRollingPolicy = new TimeBasedRollingPolicy();
    warningsRollingPolicy.setFileNamePattern("warnings.log" + HOUR_ROLL);
    warningsRollingPolicy.activateOptions();

    RollingFileAppender warningsAppender = new RollingFileAppender();
    warningsAppender.setRollingPolicy(statusesRollingPolicy);
    warningsAppender.setThreshold(Level.WARN);
    warningsAppender.setLayout(layoutStandard);
    warningsAppender.activateOptions();

    ConsoleAppender consoleAppender = new ConsoleAppender();
    consoleAppender.setThreshold(Level.WARN);
    consoleAppender.setLayout(layoutStandard);
    consoleAppender.activateOptions();
View Full Code Here

    TimeBasedRollingPolicy statusesRollingPolicy = new TimeBasedRollingPolicy();
    statusesRollingPolicy.setFileNamePattern("statuses.log" + HOUR_ROLL);
    statusesRollingPolicy.activateOptions();

    RollingFileAppender statusesAppender = new RollingFileAppender();
    statusesAppender.setRollingPolicy(statusesRollingPolicy);
    statusesAppender.addFilter(filter);
    statusesAppender.setLayout(layoutSimple);
    statusesAppender.activateOptions();

    TimeBasedRollingPolicy warningsRollingPolicy = new TimeBasedRollingPolicy();
    warningsRollingPolicy.setFileNamePattern("warnings.log" + HOUR_ROLL);
    warningsRollingPolicy.activateOptions();

    RollingFileAppender warningsAppender = new RollingFileAppender();
    warningsAppender.setRollingPolicy(statusesRollingPolicy);
    warningsAppender.setThreshold(Level.WARN);
    warningsAppender.setLayout(layoutStandard);
    warningsAppender.activateOptions();

    ConsoleAppender consoleAppender = new ConsoleAppender();
    consoleAppender.setThreshold(Level.WARN);
    consoleAppender.setLayout(layoutStandard);
    consoleAppender.activateOptions();
View Full Code Here

TOP

Related Classes of org.apache.log4j.rolling.RollingFileAppender$DefaultErrorHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.