Class DefaultLogFormatter

  • All Implemented Interfaces:
    IFormatter

    public final class DefaultLogFormatter
    extends java.lang.Object
    implements IFormatter
    The default log formatter, defines a fallback log format for all AbstractLogHandler implementations

    The message format looks like:

    [15.02 23:32.56.456] INFO: Hello, world!

    See Also:
    AbstractLogHandler
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @NotNull java.lang.String format​(@NotNull LogEntry logEntry)
      Formats a logEntry into a readable text
      • Methods inherited from class java.lang.Object

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

      • DefaultLogFormatter

        public DefaultLogFormatter()
    • Method Detail

      • format

        @NotNull
        public @NotNull java.lang.String format​(@NotNull
                                                @NotNull LogEntry logEntry)
        Description copied from interface: IFormatter
        Formats a logEntry into a readable text
        Specified by:
        format in interface IFormatter
        Parameters:
        logEntry - the log item which should be format
        Returns:
        the new formatted string