Constructor | Description |
---|---|
TimestampLabeler() |
Use the default timestamp: yyyy-MM-dd HH-mm-ss.
|
TimestampLabeler(String pattern) |
Timestamp pattern is compatible with
SimpleDateFormat(String) . |
Modifier and Type | Method | Description |
---|---|---|
File |
getLogFile(File baseFile,
int maxBackups) |
Returns the real log file.
|
void |
init(Configuration configuration) |
Initialize the labeler.
|
File |
roll(File file,
int maxBackups) |
Rolls existing log files and backups and returns a new log file.
|
public TimestampLabeler()
public TimestampLabeler(String pattern)
SimpleDateFormat(String)
.pattern
- Timestamp pattern for formatting the time-based identifypublic void init(Configuration configuration)
Labeler
public File getLogFile(File baseFile, int maxBackups)
Labeler
getLogFile
in interface Labeler
baseFile
- Defined log file by usermaxBackups
- Maximum number of backups to storeCopyright © 2019. All rights reserved.