Class GColorLogFormatter


public class GColorLogFormatter extends GLogFormatter
Color log formatter class.

Uses a compact time format and shows thread name. Made to log one-liners (except for exceptions).

  • Constructor Details

    • GColorLogFormatter

      public GColorLogFormatter()
      Creates a color log formatter.
  • Method Details

    • applyDateTime

      protected void applyDateTime(StringBuilder sb, String value)
      Description copied from class: GLogFormatter
      Applies the datetime value to the log being built by the given StringBuilder.
      Specified by:
      applyDateTime in class GLogFormatter
      Parameters:
      sb - Log message builder.
      value - Value to apply.
    • applyLevel

      protected void applyLevel(StringBuilder sb, String value)
      Description copied from class: GLogFormatter
      Applies the level value to the log being built by the given StringBuilder.
      Specified by:
      applyLevel in class GLogFormatter
      Parameters:
      sb - Log message builder.
      value - Value to apply.
    • applyThreadName

      protected void applyThreadName(StringBuilder sb, String value)
      Description copied from class: GLogFormatter
      Applies the threadName value to the log being built by the given StringBuilder.
      Specified by:
      applyThreadName in class GLogFormatter
      Parameters:
      sb - Log message builder.
      value - Value to apply.
    • applyClassName

      protected void applyClassName(StringBuilder sb, String value)
      Description copied from class: GLogFormatter
      Applies the className value to the log being built by the given StringBuilder.
      Specified by:
      applyClassName in class GLogFormatter
      Parameters:
      sb - Log message builder.
      value - Value to apply.
    • applyMessage

      protected void applyMessage(StringBuilder sb, String value)
      Description copied from class: GLogFormatter
      Applies the message value to the log being built by the given StringBuilder.
      Specified by:
      applyMessage in class GLogFormatter
      Parameters:
      sb - Log message builder.
      value - Value to apply.
    • applyThrowableMessage

      protected void applyThrowableMessage(StringBuilder sb, String value)
      Description copied from class: GLogFormatter
      Applies the throwableMessage value to the log being built by the given StringBuilder.
      Specified by:
      applyThrowableMessage in class GLogFormatter
      Parameters:
      sb - Log message builder.
      value - Value to apply.
    • applyThrowableTraceLine

      protected void applyThrowableTraceLine(StringBuilder sb, String value)
      Description copied from class: GLogFormatter
      Applies the throwableTraceLine value to the log being built by the given StringBuilder.
      Specified by:
      applyThrowableTraceLine in class GLogFormatter
      Parameters:
      sb - Log message builder.
      value - Value to apply.