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.
-
-
Constructor Summary
Constructors Constructor Description FileNamePattern(String patternArg, Context contextArg)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
convert(Object o)
String
convertInt(int i)
String
convertMultipleArguments(Object... objectList)
boolean
equals(Object obj)
IntegerTokenConverter
getIntegerTokenConverter()
String
getPattern()
DateTokenConverter<Object>
getPrimaryDateTokenConverter()
int
hashCode()
boolean
hasIntegerTokenCOnverter()
void
setPattern(String pattern)
String
toRegex()
Given date, convert this instance to a regular expressionString
toRegexForFixedDate(Date date)
Given date, convert this instance to a regular expression.String
toString()
-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getStatusManager, setContext
-
-
-
-
Method Detail
-
getPrimaryDateTokenConverter
public DateTokenConverter<Object> getPrimaryDateTokenConverter()
-
getIntegerTokenConverter
public IntegerTokenConverter getIntegerTokenConverter()
-
hasIntegerTokenCOnverter
public boolean hasIntegerTokenCOnverter()
-
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.
-
toRegex
public String toRegex()
Given date, convert this instance to a regular expression
-
-