Compiere 3.1

org.compiere.util
Class CLogFormatter

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

public class CLogFormatter
extends Formatter

Compiere Log Formatter

Version:
$Id: CLogFormatter.java,v 1.2 2006/07/30 00:54:36 jjanke Exp $
Author:
Jorg Janke

Field Summary
static String NL
          New Line
 
Method Summary
 String format(LogRecord record)
          Format
static CLogFormatter get()
          Get Formatter
static String getClassMethod(LogRecord record)
          Get Class Method from Log Record
static String getExceptionTrace(LogRecord record)
          Get Log Exception
 String getHead(Handler h)
          Return the header string for a set of formatted records.
static String getParameters(LogRecord record)
          Get Log Parameters
 String getTail(Handler h)
          Return the tail string for a set of formatted records.
 void setFormat(boolean shortFormat)
          Set Format
 
Methods inherited from class java.util.logging.Formatter
formatMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NL

public static String NL
New Line

Method Detail

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

Compiere 3.1

Compiere® is a registered trademark of ComPiere, Inc. ©2004-2008 HumanFlash.com All rights reserved.