Examples of toRegex()


Examples of ch.qos.logback.core.rolling.helper.FileNamePattern.toRegex()

      Context context = rollingFileAppender.getContext();

      File dir = null;
      FileNamePattern pattern = new FileNamePattern(fileNamePattern,
          context);
      Path path = new Path(pattern.toRegex(new Date()));

      if (!path.isAbsolute())
        dir = new File("."); //$NON-NLS-1$
      else {
        dir = path.removeLastSegments(1).toFile();
View Full Code Here

Examples of ch.qos.logback.core.rolling.helper.FileNamePattern.toRegex()

        /* extract relative pattern */
        Path p = new Path(fileNamePattern);
        pattern = new FileNamePattern(p.lastSegment(), context);
      }

      final String patternRegex = pattern.toRegex();
      File[] files = dir.listFiles(new FilenameFilter() {
        @Override
        public boolean accept(File dir, String name) {
          return name.matches(patternRegex);
        }
View Full Code Here

Examples of ch.qos.logback.core.rolling.helper.FileNamePattern.toRegex()

    if (triggeringPolicy instanceof RollingPolicyBase) {
      final RollingPolicyBase base = (RollingPolicyBase) triggeringPolicy;
      final FileNamePattern fileNamePattern = base.fileNamePattern;
      // no use checking if either fileName or  fileNamePattern are null
      if (fileNamePattern != null && fileName != null) {
        String regex = fileNamePattern.toRegex();
        return fileName.matches(regex);
      }
    }
    return false;
  }
View Full Code Here

Examples of ch.qos.logback.core.rolling.helper.FileNamePattern.toRegex()

    if (triggeringPolicy instanceof RollingPolicyBase) {
      final RollingPolicyBase base = (RollingPolicyBase) triggeringPolicy;
      final FileNamePattern fileNamePattern = base.fileNamePattern;
      // no use checking if either fileName or  fileNamePattern are null
      if (fileNamePattern != null && fileName != null) {
        String regex = fileNamePattern.toRegex();
        return fileName.matches(regex);
      }
    }
    return false;
  }
View Full Code Here

Examples of ch.qos.logback.core.util.DatePatternToRegexUtil.toRegex()

    return (o instanceof Date);
  }

  public String toRegex() {
    DatePatternToRegexUtil datePatternToRegexUtil = new DatePatternToRegexUtil(datePattern);
    return datePatternToRegexUtil.toRegex();
  }

  public boolean isPrimary() {
    return primary;
  }
View Full Code Here

Examples of ch.qos.logback.core.util.DatePatternToRegexUtil.toRegex()

    return (o instanceof Date);
  }

  public String toRegex() {
    DatePatternToRegexUtil datePatternToRegexUtil = new DatePatternToRegexUtil(datePattern);
    return datePatternToRegexUtil.toRegex();
  }

  public boolean isPrimary() {
    return primary;
  }
View Full Code Here

Examples of ch.qos.logback.core.util.DatePatternToRegexUtil.toRegex()

    return (o instanceof Date);
  }

  public String toRegex() {
    DatePatternToRegexUtil datePatternToRegexUtil = new DatePatternToRegexUtil(datePattern);
    return datePatternToRegexUtil.toRegex();
  }

  public boolean isPrimary() {
    return primary;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.