Interface LogEventWriter

All Known Implementing Classes:
BaseLogEventWriter, JsonlLogWriter, JsonLogWriter, MappingLogEventWriter, MarkdownLogWriter, TxtLogWriter, XmlLogWriter

public interface LogEventWriter
LogEventWriters allow the customization of how LogListeners write LogEvent data to output streams. Its purpose is the formatting of output data and not the modification of individual events.
Since:
2.1.4
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes the writer and releases any underlying resources.
    void
    Sets the print stream used for output.
    void
    Writes a log event to the underlying output.
  • Method Details

    • write

      void write(LogEvent ev)
      Writes a log event to the underlying output.
      Parameters:
      ev - the log event to write
    • setPrintStream

      void setPrintStream(PrintStream printStream)
      Sets the print stream used for output.
      Parameters:
      printStream - the destination stream
    • close

      void close()
      Closes the writer and releases any underlying resources.