public class TimeBasedRollingPolicy extends Object implements RollingFileMessageWriter.RollingPolicy
Constructor and Description |
---|
TimeBasedRollingPolicy(int units,
TimeUnit resolution,
String rollingFilePattern) |
TimeBasedRollingPolicy(int units,
TimeUnit resolution,
String rollingFilePattern,
Clock clock) |
TimeBasedRollingPolicy(TimeUnit resolution,
String rollingFilePattern) |
TimeBasedRollingPolicy(TimeUnit resolution,
String rollingFilePattern,
Clock clock) |
Modifier and Type | Method and Description |
---|---|
protected static DateTimeFormatter |
getFormatter(String timestampPattern,
TimeUnit resolution) |
void |
maybeUpdateCurrentFile(RollingFileMessageWriter.CurrentFileUpdater onRollFile,
boolean initialCall)
Maybe call the current file updater.
|
public TimeBasedRollingPolicy(TimeUnit resolution, String rollingFilePattern)
public TimeBasedRollingPolicy(int units, TimeUnit resolution, String rollingFilePattern)
public TimeBasedRollingPolicy(TimeUnit resolution, String rollingFilePattern, Clock clock)
public void maybeUpdateCurrentFile(@Nonnull RollingFileMessageWriter.CurrentFileUpdater onRollFile, boolean initialCall) throws IOException
RollingFileMessageWriter.RollingPolicy
maybeUpdateCurrentFile
in interface RollingFileMessageWriter.RollingPolicy
onRollFile
- The current file updater to call if the current file
should roll over.initialCall
- If this is the initial call, and the current
file updater should be called regardless.IOException
- If the file roll or update check failed.protected static DateTimeFormatter getFormatter(String timestampPattern, TimeUnit resolution)
Copyright © 2015–2018 morimekta.net. All rights reserved.