org.apache.logging.log4j.core.appender.rolling
Class FastRollingFileManager
java.lang.Object
org.apache.logging.log4j.core.appender.AbstractManager
org.apache.logging.log4j.core.appender.OutputStreamManager
org.apache.logging.log4j.core.appender.FileManager
org.apache.logging.log4j.core.appender.rolling.RollingFileManager
org.apache.logging.log4j.core.appender.rolling.FastRollingFileManager
public class FastRollingFileManager
- extends RollingFileManager
Extends RollingFileManager but instead of using a buffered output stream,
this class uses a ByteBuffer
and a RandomAccessFile
to do the
I/O.
Constructor Summary |
FastRollingFileManager(RandomAccessFile raf,
String fileName,
String pattern,
OutputStream os,
boolean append,
boolean immediateFlush,
long size,
long time,
TriggeringPolicy policy,
RolloverStrategy strategy,
String advertiseURI)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FastRollingFileManager
public FastRollingFileManager(RandomAccessFile raf,
String fileName,
String pattern,
OutputStream os,
boolean append,
boolean immediateFlush,
long size,
long time,
TriggeringPolicy policy,
RolloverStrategy strategy,
String advertiseURI)
getFastRollingFileManager
public static FastRollingFileManager getFastRollingFileManager(String fileName,
String filePattern,
boolean isAppend,
boolean immediateFlush,
TriggeringPolicy policy,
RolloverStrategy strategy,
String advertiseURI)
isEndOfBatch
public Boolean isEndOfBatch()
setEndOfBatch
public void setEndOfBatch(boolean isEndOfBatch)
write
protected void write(byte[] bytes,
int offset,
int length)
- Description copied from class:
OutputStreamManager
- Some output streams synchronize writes while others do not. Synchronizing here insures that
log events won't be intertwined.
- Overrides:
write
in class RollingFileManager
- Parameters:
bytes
- The serialized Log event.offset
- The offset into the byte array.length
- The number of bytes to write.
createFileAfterRollover
protected void createFileAfterRollover()
throws IOException
- Overrides:
createFileAfterRollover
in class RollingFileManager
- Throws:
IOException
flush
public void flush()
- Description copied from class:
OutputStreamManager
- Flush any buffers.
- Overrides:
flush
in class OutputStreamManager
close
public void close()
- Overrides:
close
in class OutputStreamManager
Copyright © 1999-2013 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.