MCPcopy Create free account
hub / github.com/RealTimeGenomics/rtg-tools / LogRecord

Class LogRecord

src/test/java/com/rtg/util/io/LogRecord.java:39–77  ·  view source on GitHub ↗

Record what is written to a log file and return it in toString .

Source from the content-addressed store, hash-verified

37 * Record what is written to a log file and return it in <code>toString</code>.
38 */
39public class LogRecord implements LogStream {
40
41 private final PrintStream mStream;
42
43 private final ByteArrayOutputStream mByteStream;
44
45 /**
46 * Creates a new record.
47 */
48 public LogRecord() {
49 mByteStream = new ByteArrayOutputStream();
50 mStream = new PrintStream(mByteStream);
51 }
52
53 @Override
54 public void close() {
55 // do nothing
56 }
57
58 @Override
59 public void removeLog() {
60 //do nothing
61 }
62
63 @Override
64 public PrintStream stream() {
65 return mStream;
66 }
67
68 @Override
69 public File file() {
70 return null;
71 }
72
73 @Override
74 public String toString() {
75 return mByteStream.toString();
76 }
77}
78

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected