Klasse JsonAppender

java.lang.Object
de.oliver.fancyanalytics.logger.appender.JsonAppender
Alle implementierten Schnittstellen:
Appender

public class JsonAppender extends Object implements Appender
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    JsonAppender(boolean prettyPrint, boolean printToConsole, boolean printToFile, String filePath)
    Constructs a JsonAppender that can output log entries in JSON format with various configurations.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    void
    append(LogEntry logEntry)
    Appends a log entry to the designated output.
    void
    Closes the appender and releases any resources associated with it.

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Konstruktordetails

    • JsonAppender

      public JsonAppender(boolean prettyPrint, boolean printToConsole, boolean printToFile, String filePath)
      Constructs a JsonAppender that can output log entries in JSON format with various configurations.
      Parameter:
      prettyPrint - If true, the JSON output will be pretty-printed.
      printToConsole - If true, the JSON output will be printed to the console.
      printToFile - If true, the JSON output will be printed to a file.
      filePath - The file path where the JSON output will be written if printToFile is true.
  • Methodendetails

    • append

      public void append(LogEntry logEntry)
      Beschreibung aus Schnittstelle kopiert: Appender
      Appends a log entry to the designated output.
      Angegeben von:
      append in Schnittstelle Appender
      Parameter:
      logEntry - The log entry containing details about the log message.
    • close

      public void close()
      Beschreibung aus Schnittstelle kopiert: Appender
      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.
      Angegeben von:
      close in Schnittstelle Appender