The time interval is determined by the content of the suffix string which is passed in to setSuffix(String).
The size interval is determined by the value passed in the setRotateSize(long).
| Modifier and Type | Field and Description |
|---|---|
| private final AccessControlContext | acc
Hides org.
References Deprecated
AccessControlContext is deprecated or references (maybe indirectly) at least one deprecated element.
|
| private int | |
| private CountingOutputStream | |
| private boolean | |
| private long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | PeriodicSizeRotatingFileHandler(final String
the file name fileName)Construct a new instance with the given output file. |
| public | PeriodicSizeRotatingFileHandler(final String
the file name fileName, final boolean true to append, false to overwriteConstruct a new instance with the given output file and append setting. |
| public | PeriodicSizeRotatingFileHandler(final File
the file file, final String the format suffix to use suffix)Construct a new instance with the given output file. |
| public | PeriodicSizeRotatingFileHandler(final File
the file file, final String the format suffix to use suffix, final boolean true to append, false to overwriteConstruct a new instance with the given output file and append setting. |
| public | PeriodicSizeRotatingFileHandler(final File
the file file, final String the format suffix to use suffix, final long the size the file should rotate at rotateSize, final int the maximum number of files to backup maxBackupIndex)Construct a new instance with the given output file. |
| public | PeriodicSizeRotatingFileHandler(final File
the file file, final String the format suffix to use suffix, final long the size the file should rotate at rotateSize, final int the maximum number of files to backup maxBackupIndex, final boolean true to append, false to overwriteConstruct a new instance with the given output file. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if file should rotate on boot, otherwise false/Indicates whether or a not the handler should rotate the file before the first log record is written. |
| protected void | preWrite(final ExtLogRecord
the record about to be logged record)Overrides org. Execute any pre-write policy, such as file rotation. |
| public void | setFile(final File
the file file)Overrides org. Set the output file. |
| private void | |
| public void | setMaxBackupIndex(final int
the maximum backup index maxBackupIndex)Set the maximum backup index (the number of log files to keep around). |
| public void | setOutputStream(final OutputStream
the new output stream or outputStream)null for noneOverrides org. Set the output stream to write to. |
| public void | setRotateOnBoot(final boolean
true to rotate on boot, otherwise falseSet to a value of |
| public void | setRotateSize(final long
the number of bytes before the log is rotated rotateSize)Set the rotation size, in bytes. |
| acc | back to summary |
|---|---|
| private final AccessControlContext acc Hides org. References Deprecated
See corresponding docs for further information. | |
| maxBackupIndex | back to summary |
|---|---|
| private int maxBackupIndex | |
| outputStream | back to summary |
|---|---|
| private CountingOutputStream outputStream Hides org. | |
| rotateOnBoot | back to summary |
|---|---|
| private boolean rotateOnBoot | |
| rotateSize | back to summary |
|---|---|
| private long rotateSize | |
| PeriodicSizeRotatingFileHandler | back to summary |
|---|---|
| public PeriodicSizeRotatingFileHandler() Default constructor. | |
| PeriodicSizeRotatingFileHandler | back to summary |
|---|---|
| public PeriodicSizeRotatingFileHandler(final String fileName) throws FileNotFoundException Construct a new instance with the given output file.
| |
| PeriodicSizeRotatingFileHandler | back to summary |
|---|---|
| public PeriodicSizeRotatingFileHandler(final String fileName, final boolean append) throws FileNotFoundException Construct a new instance with the given output file and append setting.
| |
| PeriodicSizeRotatingFileHandler | back to summary |
|---|---|
| public PeriodicSizeRotatingFileHandler(final File file, final String suffix) throws FileNotFoundException Construct a new instance with the given output file.
| |
| PeriodicSizeRotatingFileHandler | back to summary |
|---|---|
| public PeriodicSizeRotatingFileHandler(final File file, final String suffix, final boolean append) throws FileNotFoundException Construct a new instance with the given output file and append setting.
| |
| PeriodicSizeRotatingFileHandler | back to summary |
|---|---|
| public PeriodicSizeRotatingFileHandler(final File file, final String suffix, final long rotateSize, final int maxBackupIndex) throws FileNotFoundException Construct a new instance with the given output file.
| |
| PeriodicSizeRotatingFileHandler | back to summary |
|---|---|
| public PeriodicSizeRotatingFileHandler(final File file, final String suffix, final long rotateSize, final int maxBackupIndex, final boolean append) throws FileNotFoundException Construct a new instance with the given output file.
| |
| isRotateOnBoot | back to summary |
|---|---|
| public boolean isRotateOnBoot() Indicates whether or a not the handler should rotate the file before the first log record is written.
| |
| preWrite | back to summary |
|---|---|
| protected void preWrite(final ExtLogRecord record) Overrides org. Doc from org. Execute any pre-write policy, such as file rotation. The write lock is held during this method, so make it quick. The default implementation does nothing. This implementation checks to see if the scheduled rollover time has yet occurred.
| |
| setFile | back to summary |
|---|---|
| public void setFile(final File file) throws FileNotFoundException Overrides org. Doc from org. Set the output file.
| |
| setFileInternal | back to summary |
|---|---|
| private void setFileInternal(final File file, final boolean doPrivileged) throws FileNotFoundException | |
| setMaxBackupIndex | back to summary |
|---|---|
| public void setMaxBackupIndex(final int maxBackupIndex) Set the maximum backup index (the number of log files to keep around).
| |
| setOutputStream | back to summary |
|---|---|
| public void setOutputStream(final OutputStream outputStream) Overrides org. Doc from org. Set the output stream to write to. The output stream will then belong to this handler; when the handler is closed or a new writer or output stream is set, this output stream will be closed.
| |
| setRotateOnBoot | back to summary |
|---|---|
| public void setRotateOnBoot(final boolean rotateOnBoot) Set to a value of
| |
| setRotateSize | back to summary |
|---|---|
| public void setRotateSize(final long rotateSize) Set the rotation size, in bytes.
| |