public class PatternProcessor extends Object
Modifier and Type | Field and Description |
---|---|
protected static org.apache.logging.log4j.Logger |
LOGGER |
Constructor and Description |
---|
PatternProcessor(String pattern)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
formatFileName(StringBuilder buf,
Object... objects)
Format file name.
|
void |
formatFileName(StringBuilder buf,
Object obj)
Format file name.
|
void |
formatFileName(StrSubstitutor subst,
StringBuilder buf,
Object obj)
Format file name.
|
long |
getNextTime(long current,
int increment,
boolean modulus)
Returns the next potential rollover time.
|
void |
updateTime() |
protected static final org.apache.logging.log4j.Logger LOGGER
public PatternProcessor(String pattern)
pattern
- The file pattern.public long getNextTime(long current, int increment, boolean modulus)
current
- The current time.increment
- The increment to the next time.modulus
- If true the time will be rounded to occur on a boundary aligned with the increment.public void updateTime()
public final void formatFileName(StringBuilder buf, Object obj)
buf
- string buffer to which formatted file name is appended, may not be null.obj
- object to be evaluated in formatting, may not be null.public final void formatFileName(StrSubstitutor subst, StringBuilder buf, Object obj)
subst
- The StrSubstitutor.buf
- string buffer to which formatted file name is appended, may not be null.obj
- object to be evaluated in formatting, may not be null.protected final void formatFileName(StringBuilder buf, Object... objects)
buf
- string buffer to which formatted file name is appended, may not be null.objects
- objects to be evaluated in formatting, may not be null.Copyright © 1999-2021 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.