Class CLogFormatter

java.lang.Object
java.util.logging.Formatter
org.compiere.util.CLogFormatter

public class CLogFormatter extends Formatter
iDempiere Log Formatter
Version:
$Id: CLogFormatter.java,v 1.2 2006/07/30 00:54:36 jjanke Exp $
Author:
Jorg Janke
  • Field Details

    • NL

      public static String NL
      New Line
  • Method Details

    • get

      public static CLogFormatter get()
      Get Formatter
      Returns:
      singleton
    • format

      public String format(LogRecord record)
      Format
      Specified by:
      format in class Formatter
      Parameters:
      record - log record
      Returns:
      formatted string
    • getHead

      public String getHead(Handler h)
      Get the header string for a set of formatted records.
      Overrides:
      getHead in class Formatter
      Parameters:
      h - The target handler.
      Returns:
      header string
    • getTail

      public String getTail(Handler h)
      Get the tail string for a set of formatted records.
      Overrides:
      getTail in class Formatter
      Parameters:
      h - The target handler.
      Returns:
      tail string
    • setFormat

      public void setFormat(boolean shortFormat)
      Set using long or short Format
      Parameters:
      shortFormat - true to use short format
    • getClassMethod

      public static String getClassMethod(LogRecord record)
      Get Class Method from Log Record
      Parameters:
      record - record
      Returns:
      class.method
    • getParameters

      public static String getParameters(LogRecord record)
      Get Log Parameters
      Parameters:
      record - log record
      Returns:
      empty string or parameters
    • getExceptionTrace

      public static String getExceptionTrace(LogRecord record)
      Get Log Exception
      Parameters:
      record - log record
      Returns:
      null if not exists or exception trace text