Constructor | Description |
---|---|
ConsoleWriter() |
|
ConsoleWriter(PrintStream stream) |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
Close the writer and release all resources.
|
void |
flush() |
Flush this writer and force any buffered data to output.
|
Set<LogEntryValue> |
getRequiredLogEntryValues() |
Get all log entry values that are required by this writer.
|
void |
init(Configuration configuration) |
Initialize the writer (open a file for example).
|
void |
write(LogEntry logEntry) |
Write a log entry.
|
public ConsoleWriter()
public ConsoleWriter(PrintStream stream)
stream
- Print stream for outputting log entriespublic Set<LogEntryValue> getRequiredLogEntryValues()
Writer
getRequiredLogEntryValues
in interface Writer
public void init(Configuration configuration)
Writer
public void write(LogEntry logEntry)
Writer
public void flush()
Writer
public void close()
Writer
close()
call, it should be
registered in the init()
method at VMShutdownHook
for
automatically shutdown when VM will be shutdown.Copyright © 2019. All rights reserved.