Package ch.qos.logback.core.rolling

Examples of ch.qos.logback.core.rolling.RollingPolicy


  public RollingFileAppenderResource(
      RollingFileAppender<ILoggingEvent> rollingFileAppender,
      URI baseLocation) {

    super(rollingFileAppender, baseLocation);
    RollingPolicy rollingPolicy = rollingFileAppender.getRollingPolicy();
    TriggeringPolicy<ILoggingEvent> triggeringPolicy = rollingFileAppender
        .getTriggeringPolicy();

    if (rollingPolicy instanceof TimeBasedRollingPolicy<?>) {
      TimeBasedRollingPolicy<ILoggingEvent> policy = (TimeBasedRollingPolicy<ILoggingEvent>) rollingPolicy;
View Full Code Here


  public File[] getArchivedLogFiles(
      RollingFileAppender<ILoggingEvent> rollingFileAppender) {
    if (rollingFileAppender == null)
      return null;

    RollingPolicy rollingPolicy = rollingFileAppender.getRollingPolicy();
    if (rollingPolicy == null)
      return null;

    if (rollingPolicy instanceof RollingPolicyBase) {
      RollingPolicyBase policy = (RollingPolicyBase) rollingPolicy;
View Full Code Here

    super(typeNames, debugEnabled, outputFile, maxLogFileSize, maxLogBackupFiles, delimiter, settings);
  }

  @Override
  protected Logger initLogger(String fileStr) throws IOException {
    RollingPolicy rollingPolicy = initRollingPolicy(fileStr, getMaxLogBackupFiles(), getMaxLogFileSize());
    RollingFileAppender appender = buildAppender(buildEncoder(), rollingPolicy);
   
    rollingPolicy.start();
    appender.start();
   
    // configure the logger for info and add the appender
    return getAndConfigureLogger(appender);
  }
View Full Code Here

TOP

Related Classes of ch.qos.logback.core.rolling.RollingPolicy

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.