Package com.mckoi.util
Class LogWriter
java.lang.Object
java.io.Writer
com.mckoi.util.LogWriter
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
A Writer that writes information to a log file that archives old log
entries when it goes above a certain size.
- Author:
- Tobias Downer
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LogWriter
Constructs the log writer. The 'base_name' is the name of log file. 'max_size' is the maximum size the file can grow to before it is copied to a log archive.- Throws:
IOException
-
-
Method Details
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
- Specified by:
write
in classWriter
- Throws:
IOException
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classWriter
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classWriter
- Throws:
IOException
-