org.apache.logging.log4j.core.appender.rolling
Class PatternProcessor

java.lang.Object
  extended by org.apache.logging.log4j.core.appender.rolling.PatternProcessor

public class PatternProcessor
extends Object

Parse the rollover pattern.


Constructor Summary
PatternProcessor(String pattern)
          Constructor.
 
Method Summary
protected  void formatFileName(Object[] objects, StringBuilder buf)
          Format file name.
protected  void formatFileName(Object obj, StringBuilder buf)
          Format file name.
 long getNextTime(long current)
          Return the next expire time.
 long getNextTime(long current, int increment)
          Return the next potential rollover time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternProcessor

public PatternProcessor(String pattern)
Constructor.

Parameters:
pattern - The file pattern.
Method Detail

getNextTime

public long getNextTime(long current)
Return the next expire time.

Parameters:
current - The current time.
Returns:
The next expire time.

getNextTime

public long getNextTime(long current,
                        int increment)
Return the next potential rollover time.

Parameters:
current - The current time.
increment - The increment to the next time.
Returns:
the next potential rollover time.

formatFileName

protected final void formatFileName(Object obj,
                                    StringBuilder buf)
Format file name.

Parameters:
obj - object to be evaluated in formatting, may not be null.
buf - string buffer to which formatted file name is appended, may not be null.

formatFileName

protected final void formatFileName(Object[] objects,
                                    StringBuilder buf)
Format file name.

Parameters:
objects - objects to be evaluated in formatting, may not be null.
buf - string buffer to which formatted file name is appended, may not be null.


Copyright © 1999-2012 Apache Software Foundation. All Rights Reserved.