Constructor | Description |
---|---|
LogcatWriter() |
Class name without package part will be used as tag (automatically generated for each log entry).
|
LogcatWriter(String tag) |
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 LogcatWriter()
public LogcatWriter(String tag)
tag
- Static tag for logcatpublic 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.