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.RollingPolicymaybeUpdateCurrentFile in interface RollingFileMessageWriter.RollingPolicyonRollFile - 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–2017 morimekta.net. All rights reserved.