public class DailyFileManager
extends FileManager
| Modifier | Constructor and Description |
|---|---|
protected |
DailyFileManager(String fileName,
File outputFile,
OutputStream outputStream,
Layout<? extends Serializable> layout,
String directory,
String fileNamePrefix,
String dateFormat,
String fileNameSuffix,
long maxFileSize,
long fileSize,
long tomorrow)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkRollover()
Checks if a rollover should occur.
|
static DailyFileManager |
getFileManager(String directory,
String fileNamePrefix,
String dateFormat,
String fileNameSuffix,
long maxFileSize,
Layout<? extends Serializable> layout)
Gets the daily file manager.
|
protected OutputStream |
getOutputStream() |
boolean |
isOversize()
Asks if the file is oversize.
|
boolean |
isTruncated()
Asks if the file has been truncated.
|
void |
setTruncated(boolean truncated)
Sets the 'truncated' indicator.
|
protected void |
write(byte[] bytes,
int offset,
int length) |
createOutputStream, getBufferSize, getContentFormat, getFileManager, getFileName, isAppend, isCreateOnDemand, isLocking, write, writeToDestinationcloseOutputStream, drain, flush, flushBuffer, flushDestination, getByteBuffer, getManager, hasOutputStream, isOpen, releaseSub, setOutputStream, skipFooter, write, write, writeFooterprotected DailyFileManager(String fileName,
File outputFile,
OutputStream outputStream,
Layout<? extends Serializable> layout,
String directory,
String fileNamePrefix,
String dateFormat,
String fileNameSuffix,
long maxFileSize,
long fileSize,
long tomorrow)
fileName - The pseudo file name.outputFile - The actual file.outputStream - The output stream.layout - The layout.directory - The log file directory.fileNamePrefix - The log file name prefix.dateFormat - The date format.fileNameSuffix - The log file name suffix.maxFileSize - The maximum file size.fileSize - The current file size.tomorrow - Tomorrow at midnight in millis.public static DailyFileManager getFileManager(String directory, String fileNamePrefix, String dateFormat, String fileNameSuffix, long maxFileSize, Layout<? extends Serializable> layout)
directory - The log file directory.fileNamePrefix - The log file name prefix.dateFormat - The date format.fileNameSuffix - The log file name suffix.maxFileSize - The maximum file size.layout - The layout.@CheckReturnValue public boolean checkRollover()
@CheckReturnValue public boolean isOversize()
@CheckReturnValue public boolean isTruncated()
public void setTruncated(boolean truncated)
truncated - The new value of the 'truncated' indicator.protected OutputStream getOutputStream()
getOutputStream in class OutputStreamManagerprotected void write(byte[] bytes,
int offset,
int length)
write in class OutputStreamManagerCopyright © 2003-2019 Serge Brisson. All Rights Reserved.