Class FileNamePattern

java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.rolling.helper.FileNamePattern
All Implemented Interfaces:
ContextAware

public class FileNamePattern extends ContextAwareBase
After parsing file name patterns, given a number or a date, instances of this class can be used to compute a file name according to the file name pattern and the current date or integer.
Author:
Ceki Gülcü
  • Constructor Details

    • FileNamePattern

      public FileNamePattern(String patternArg, Context contextArg)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getPrimaryDateTokenConverter

      public DateTokenConverter<Object> getPrimaryDateTokenConverter()
    • getIntegerTokenConverter

      public IntegerTokenConverter getIntegerTokenConverter()
    • hasIntegerTokenCOnverter

      public boolean hasIntegerTokenCOnverter()
    • convertMultipleArguments

      public String convertMultipleArguments(Object... objectList)
    • convert

      public String convert(Object o)
    • convertInt

      public String convertInt(int i)
    • setPattern

      public void setPattern(String pattern)
    • getPattern

      public String getPattern()
    • toRegexForFixedDate

      public String toRegexForFixedDate(Date date)
      Given date, convert this instance to a regular expression. Used to compute sub-regex when the pattern has both %d and %i, and the date is known.
      Parameters:
      date - - known date
    • toRegexForFixedDate

      public String toRegexForFixedDate(Instant instant)
      Given date, convert this instance to a regular expression. Used to compute sub-regex when the pattern has both %d and %i, and the date is known.
      Parameters:
      instant - - known instant
    • toRegex

      public String toRegex()
      Given date, convert this instance to a regular expression