Examples of toRegexForFixedDate()


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

      matchingFileArray[i] = new File(sa[i]);
    }
    FileNamePattern fnp = new FileNamePattern("c:/log/debug-old-%d{yyyy-MM-dd}.%i.log", context);
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
    String rexexp = null;
    rexexp = fnp.toRegexForFixedDate(sdf.parse("2010-08-10"));
    String stemRegex = FileFilterUtil.afterLastSlash(rexexp);
    int result = FileFilterUtil.findHighestCounter(matchingFileArray, stemRegex);
    assertEquals(12, result);
  }
}
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.