Class JsonAppender
java.lang.Object
de.oliver.fancyanalytics.logger.appender.JsonAppender
- All Implemented Interfaces:
Appender
-
Constructor Summary
ConstructorsConstructorDescriptionJsonAppender(boolean prettyPrint, boolean printToConsole, boolean printToFile, String filePath) Constructs a JsonAppender that can output log entries in JSON format with various configurations. -
Method Summary
-
Constructor Details
-
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.- Parameters:
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.
-
-
Method Details
-
append
Description copied from interface:AppenderAppends a log entry to the designated output. -
close
public void close()Description copied from interface:AppenderCloses 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.
-