Class MDKFormatter

java.lang.Object
java.util.logging.Formatter
madkit.logging.MDKFormatter

public class MDKFormatter extends Formatter
This class extends the Formatter class to provide a custom log formatter for MDK. It includes a static header and formats log records with their level and message.
See Also:
  • Constructor Details

    • MDKFormatter

      public MDKFormatter()
  • Method Details

    • format

      public String format(LogRecord record)
      Formats the given log record. The format includes the log level and the message.
      Specified by:
      format in class Formatter
      Parameters:
      record - the log record to be formatted
      Returns:
      the formatted log record as a string
    • getHead

      public String getHead(Handler h)
      Returns the static header for the log records.
      Overrides:
      getHead in class Formatter
      Parameters:
      h - the handler for which the header is to be returned
      Returns:
      the static header as a string