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 Details

    • StringWriter

      protected StringWriter()
  • Method Details

    • getRequiredLogEntryValues

      public Set<org.pmw.tinylog.writers.LogEntryValue> getRequiredLogEntryValues()
      Specified by:
      getRequiredLogEntryValues in interface org.pmw.tinylog.writers.Writer
    • init

      public void init(org.pmw.tinylog.Configuration configuration) throws Exception
      Specified by:
      init in interface org.pmw.tinylog.writers.Writer
      Throws:
      Exception
    • write

      public void write(org.pmw.tinylog.LogEntry logEntry) throws Exception
      Specified by:
      write in interface org.pmw.tinylog.writers.Writer
      Throws:
      Exception
    • flush

      public void flush() throws Exception
      Specified by:
      flush in interface org.pmw.tinylog.writers.Writer
      Throws:
      Exception
    • close

      public void close() throws Exception
      Specified by:
      close in interface org.pmw.tinylog.writers.Writer
      Throws:
      Exception
    • getResult

      public String 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.