Constructor | Description |
---|---|
CountPolicy(long limit) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
check(File logFile) |
Determine whether a log file can be continued.
|
boolean |
check(String logEntry) |
Determine whether a log entry can be written into the current log file.
|
void |
init(Configuration configuration) |
Initialize the policy.
|
void |
reset() |
The log file was rolled and reset the policy.
|
public CountPolicy(long limit) throws IllegalArgumentException
limit
- Maximum number of log entries per file (must be > 0)IllegalArgumentException
- if limit is <= 0public void init(Configuration configuration)
Policy
public boolean check(File logFile) throws IOException
Policy
check
in interface Policy
logFile
- Log file to continuetrue
to continue the log file, false
to trigger a rolloverIOException
- Failed to handle log filepublic boolean check(String logEntry)
Policy
Copyright © 2019. All rights reserved.