Module de.carne

Class LogLineFormatter


  • public class LogLineFormatter
    extends java.util.logging.Formatter
    Formatter implementation providing a simple static single line (except for stack trace information) log format.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.time.format.DateTimeFormatter DATE_TIME_FORMAT
      The DateTimeFormatter used for record timestamp formatting.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String format​(@Nullable java.util.logging.LogRecord logRecord)  
      java.lang.String formatMillis​(java.util.logging.LogRecord logRecord)
      Formats a LogRecord's time attribute.
      • 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
    • Field Detail

      • DATE_TIME_FORMAT

        public static final java.time.format.DateTimeFormatter DATE_TIME_FORMAT
        The DateTimeFormatter used for record timestamp formatting.
    • Constructor Detail

      • LogLineFormatter

        public LogLineFormatter()
    • Method Detail

      • format

        public java.lang.String format​(@Nullable java.util.logging.LogRecord logRecord)
        Specified by:
        format in class java.util.logging.Formatter
      • formatMillis

        public java.lang.String formatMillis​(java.util.logging.LogRecord logRecord)
        Formats a LogRecord's time attribute.
        Parameters:
        logRecord - the LogRecord to format.
        Returns:
        the formatted LogRecord time.
        See Also:
        LogRecord.getMillis()