Package hudson.util.io
Class RewindableRotatingFileOutputStream
java.lang.Object
java.io.OutputStream
hudson.util.io.RewindableFileOutputStream
hudson.util.io.RewindableRotatingFileOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
ReopenableFileOutputStream that does log rotation upon rewind.- Since:
- 2.18
- Author:
- Kohsuke Kawaguchi
-
Field Summary
Fields inherited from class hudson.util.io.RewindableFileOutputStream
out -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeletes all the log files, including rotated files.protected FilegetNumberedFileName(int n) voidrewind()In addition to close, ensure that the next "open" would truncate the file.Methods inherited from class hudson.util.io.RewindableFileOutputStream
close, flush, write, write, writeMethods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
RewindableRotatingFileOutputStream
-
-
Method Details
-
getNumberedFileName
-
rewind
Description copied from class:RewindableFileOutputStreamIn addition to close, ensure that the next "open" would truncate the file.- Overrides:
rewindin classRewindableFileOutputStream- Throws:
IOException
-
deleteAll
public void deleteAll()Deletes all the log files, including rotated files.
-