Package org.djutils.logger
Class LoggerTest.StringWriter
java.lang.Object
org.djutils.logger.LoggerTest.StringWriter
- All Implemented Interfaces:
org.pmw.tinylog.writers.Writer
- Enclosing class:
- LoggerTest
protected static class LoggerTest.StringWriter
extends Object
implements org.pmw.tinylog.writers.Writer
...
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Nullify the last logged message (so we can distinguish a newly received message even when it is the empty string.void
close()
void
flush()
Set<org.pmw.tinylog.writers.LogEntryValue>
Return the last logged message.void
init
(org.pmw.tinylog.Configuration configuration) void
write
(org.pmw.tinylog.LogEntry logEntry)
-
Constructor Details
-
StringWriter
protected StringWriter()
-
-
Method Details
-
getRequiredLogEntryValues
- Specified by:
getRequiredLogEntryValues
in interfaceorg.pmw.tinylog.writers.Writer
-
init
- Specified by:
init
in interfaceorg.pmw.tinylog.writers.Writer
- Throws:
Exception
-
write
- Specified by:
write
in interfaceorg.pmw.tinylog.writers.Writer
- Throws:
Exception
-
flush
- Specified by:
flush
in interfaceorg.pmw.tinylog.writers.Writer
- Throws:
Exception
-
close
- Specified by:
close
in interfaceorg.pmw.tinylog.writers.Writer
- Throws:
Exception
-
getResult
Return the last logged message.- Returns:
- String; the last logged message
-
clear
public void clear()Nullify the last logged message (so we can distinguish a newly received message even when it is the empty string.
-