Class MinimalLogFormatter

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAULT_TIMESTAMP_FORMAT
      The default format string that will be used for generating timestamps.
    • Constructor Summary

      Constructors 
      Constructor Description
      MinimalLogFormatter()
      Creates a new instance of this log formatter with the default settings.
      MinimalLogFormatter​(java.lang.String timestampFormat, boolean includeLevel, boolean lineBreakAfterHeader, boolean lineBreakAfterMessage)
      Creates a new instance of this log formatter with the provided configuration.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String format​(java.util.logging.LogRecord record)
      Formats the provided log record.
      • Methods inherited from class java.util.logging.Formatter

        formatMessage, getHead, getTail
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MinimalLogFormatter

        public MinimalLogFormatter()
        Creates a new instance of this log formatter with the default settings. Generated messages will include a timestamp generated using the format string "'['dd/MMM/yyyy:HH:mm:ss Z']'", will not include the log level, and will not include a line break after the timestamp or the message.
      • MinimalLogFormatter

        public MinimalLogFormatter​(@Nullable
                                   java.lang.String timestampFormat,
                                   boolean includeLevel,
                                   boolean lineBreakAfterHeader,
                                   boolean lineBreakAfterMessage)
        Creates a new instance of this log formatter with the provided configuration.
        Parameters:
        timestampFormat - The format string used to generate timestamps. If this is null, then timestamps will not be included in log messages.
        includeLevel - Indicates whether to include the log level in the generated messages.
        lineBreakAfterHeader - Indicates whether to insert a line break after the timestamp and/or log level.
        lineBreakAfterMessage - Indicates whether to insert aline break after the generated message.
    • Method Detail

      • format

        @NotNull
        public java.lang.String format​(@NotNull
                                       java.util.logging.LogRecord record)
        Formats the provided log record.
        Specified by:
        format in class java.util.logging.Formatter
        Parameters:
        record - The log record to be formatted.
        Returns:
        A string containing the formatted log record.