com.ptc.windchill.esi.utl
Class ESILogger

java.lang.Object
  extended bycom.ptc.windchill.esi.utl.ESILogger

public final class ESILogger
extends Object

A Wrapper class for performing Info*Engine LogWriter functions (i.e. DEBUG, INFO, ERROR, AUDIT, TRANSACTION, STAT ). It uses the com.infoengine.log.LogWriter to add log infomation to a specific log file.

This provides a common place for ESI(i.e.Enterprise System Integration ) service to adjust the changes with com.infoengine.log.LogWriter, and a common way to keep logging message format consistent.

Supported API: true

Extendable: false

See Also:
LogWriter

Field Summary
private static String CLASSNAME
           
static String DEFAULT_CHANNEL
           
static String ENTER
           
static String EXIT
           
private static String RESOURCE
           
static String SEPERATOR
           
 
Constructor Summary
ESILogger()
           
 
Method Summary
static void audit(Object message)
          Passes the argument to LogWriter.audit().
static void audit(Object source, Object message)
          Formats the two arguments and passes the result to LogWriter.audit().
static void debug(Object message)
          Passes the argument to LogWriter.debug().
static void debug(Object source, Object message)
          Formats the two arguments and passes the result to LogWriter.audit().
static void enter(Object rtn)
          Record entry into a routine in the debug log.
static void error(Object message)
          Passes the argument to LogWriter.error().
static void error(Object source, Object message)
          Formats the two arguments and passes the result to LogWriter.error().
static void exit(Object rtn)
          Record exit from a routine in the debug log.
static StringBuffer formatMessage(Object source, Object message)
          Concatenates two objects in a StringBuffer, separated by ": ".
static void info(Object message)
          Forwards the argument to LogWriter.info().
static void info(Object source, Object message)
          Formats the two arguments and passes the result to LogWriter.info().
static void logException(String source, Throwable error)
          Log an exception.
static void logException(Throwable error)
          Log an exception.
static void stackTrace(String source, Throwable error)
          Log an exception stack trace.
static void stackTrace(Throwable error)
          Log an exception stacktrace.
static void stat(Object message)
          Forwards the argument to LogWriter.stat().
static void stat(Object source, Object message)
          Formats the two arguments and passes the result to LogWriter.stat().
static void transaction(Object message)
          Forwards the argument to LogWriter.transaction().
static void transaction(Object source, Object message)
          Formats the two arguments and passes the result to LogWriter.transaction().
static boolean verboseAudit()
           
static boolean verboseDebug()
           
static boolean verboseError()
           
static boolean verboseInfo()
           
static boolean verboseStat()
           
static boolean verboseTransaction()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

DEFAULT_CHANNEL

public static String DEFAULT_CHANNEL

SEPERATOR

public static final String SEPERATOR
See Also:
Constant Field Values

ENTER

public static final String ENTER
See Also:
Constant Field Values

EXIT

public static final String EXIT
See Also:
Constant Field Values
Constructor Detail

ESILogger

public ESILogger()
Method Detail

audit

public static void audit(Object source,
                         Object message)
Formats the two arguments and passes the result to LogWriter.audit().

Supported API: true

Parameters:
source - The prefix of the message.
message - The message text.

audit

public static void audit(Object message)
Passes the argument to LogWriter.audit().

Supported API: true

Parameters:
message -

debug

public static void debug(Object source,
                         Object message)
Formats the two arguments and passes the result to LogWriter.audit().

Supported API: true

Parameters:
source - The text that prefixes the message.
message - The message to display.

debug

public static void debug(Object message)
Passes the argument to LogWriter.debug().

Supported API: true

Parameters:
message -

enter

public static void enter(Object rtn)
Record entry into a routine in the debug log.

Supported API: true

Parameters:
rtn - The name of the routine.

exit

public static void exit(Object rtn)
Record exit from a routine in the debug log.

Supported API: true

Parameters:
rtn -

error

public static void error(Object source,
                         Object message)
Formats the two arguments and passes the result to LogWriter.error().

Supported API: true

Parameters:
source - The originator of the message.
message - The text to display.

error

public static void error(Object message)
Passes the argument to LogWriter.error().

Supported API: true

Parameters:
message -

formatMessage

public static StringBuffer formatMessage(Object source,
                                         Object message)
Concatenates two objects in a StringBuffer, separated by ": ".

Supported API: true

Parameters:
source - The prefix of the message.
message - The message text.
Returns:
StringBuffer

info

public static void info(Object source,
                        Object message)
Formats the two arguments and passes the result to LogWriter.info().

Supported API: true

Parameters:
source - The prefix message.
message - The message text.

info

public static void info(Object message)
Forwards the argument to LogWriter.info().

Supported API: true

Parameters:
message -

logException

public static void logException(Throwable error)
Log an exception.

Supported API: true

Parameters:
error -

logException

public static void logException(String source,
                                Throwable error)
Log an exception. Prefix the log entry with the first argument.

Supported API: true

Parameters:
source - The prefix to the message.
error - The error to log.

stackTrace

public static void stackTrace(Throwable error)
Log an exception stacktrace.

Supported API: true

Parameters:
error -

stackTrace

public static void stackTrace(String source,
                              Throwable error)
Log an exception stack trace. Prefix the log entry with the first argument.

Supported API: true

Parameters:
source -
error -

stat

public static void stat(Object source,
                        Object message)
Formats the two arguments and passes the result to LogWriter.stat().

Supported API: true

Parameters:
source -
message -

stat

public static void stat(Object message)
Forwards the argument to LogWriter.stat().

Supported API: true

Parameters:
message -

transaction

public static void transaction(Object source,
                               Object message)
Formats the two arguments and passes the result to LogWriter.transaction().

Supported API: true

Parameters:
source -
message -

transaction

public static void transaction(Object message)
Forwards the argument to LogWriter.transaction().

Supported API: true

Parameters:
message -

verboseDebug

public static boolean verboseDebug()

verboseError

public static boolean verboseError()

verboseInfo

public static boolean verboseInfo()

verboseAudit

public static boolean verboseAudit()

verboseTransaction

public static boolean verboseTransaction()

verboseStat

public static boolean verboseStat()