Interface Appender

All Known Implementing Classes:
ConsoleAppender, JsonAppender, MockAppender

public interface Appender
The Appender interface defines the contract for logging appenders which are responsible for writing log entries to various outputs (such as console, file, etc.).
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    append(LogEntry logEntry)
    Appends a log entry to the designated output.
    void
    Closes the appender and releases any resources associated with it.
  • Method Details

    • append

      void append(LogEntry logEntry)
      Appends a log entry to the designated output.
      Parameters:
      logEntry - The log entry containing details about the log message.
    • close

      void close()
      Closes the appender and releases any resources associated with it. This method should be called when the appender is no longer needed to ensure that all underlying resources are properly disposed of.