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)
      Return 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)
      Return 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 Format
      Parameters:
      shortFormat - 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:
      parameters empty string or parameters
    • getExceptionTrace

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