Class BuildLogFileWriter
java.lang.Object
com.atlassian.bamboo.build.logger.BuildLogFileWriter
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
Class to encapsulate streaming of build logs.
The writer is opened on creation of the BuildLogFileWriter and a call to
close() must be made when finished writing.
This class is deliberately made not thread safe.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
BuildLogFileWriter
-
-
Method Details
-
writeLog
Writes one line of logs to the log file- Parameters:
logEntry
- to be written to file- Throws:
IOException
- if errors accessing the file
-
writeVerbatim
Writes a text to a log file without any changes.- Throws:
IOException
-
close
Closes the writer to the log file. Must be called when writing complete- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
- if problems closing the file
-
flush
- Specified by:
flush
in interfaceFlushable
- Throws:
IOException
-