com.bea.commerce.ebusiness.discount.util
Class Log

java.lang.Object
  extended by com.bea.commerce.ebusiness.discount.util.Log

Deprecated See BEA Commerce product offering

@Deprecated
public class Log
extends Object

This class provides some very simple logging interfaces. Everything is static, so just call Log.info(), etc. All static methods for this Singleton service.


Field Summary
static boolean consoleMode
          Deprecated See BEA Commerce product offering
static String logDir
          Deprecated See BEA Commerce product offering
static String logFile
          Deprecated See BEA Commerce product offering
static PrintWriter logWriter
          Deprecated See BEA Commerce product offering
static PrintWriter stderrWriter
          Deprecated See BEA Commerce product offering
static PrintWriter stdoutWriter
          Deprecated See BEA Commerce product offering
static String T_SEP
          Deprecated See BEA Commerce product offering
 
Constructor Summary
Log()
          Deprecated See BEA Commerce product offering
 
Method Summary
static void clearConsole()
          Deprecated See BEA Commerce product offering
static String currentTime()
          Deprecated See BEA Commerce product offering
static void debug(Object o, String s)
          Deprecated See BEA Commerce product offering
static void debug(String s)
          Deprecated See BEA Commerce product offering
static void debug(String s, boolean newline)
          Deprecated See BEA Commerce product offering
static void debug(Throwable e)
          Deprecated See BEA Commerce product offering
static void error(Object o, String s)
          Deprecated See BEA Commerce product offering
static void error(String s)
          Deprecated See BEA Commerce product offering
static void error(String s, boolean newline)
          Deprecated See BEA Commerce product offering
static void error(Throwable e)
          Deprecated See BEA Commerce product offering
static void exception(Throwable e)
          Deprecated See BEA Commerce product offering
static void fatal(String s, int exitVal)
          Deprecated See BEA Commerce product offering
static void fatal(Throwable e, int exitVal)
          Deprecated See BEA Commerce product offering
static PrintWriter getPrintWriter()
          Deprecated See BEA Commerce product offering
static String getStackTrace(Throwable e)
          Deprecated See BEA Commerce product offering
static PrintWriter getStderrWriter()
          Deprecated See BEA Commerce product offering
static PrintWriter getStdoutWriter()
          Deprecated See BEA Commerce product offering
static void info(String s)
          Deprecated See BEA Commerce product offering
static void info(String s, boolean newline)
          Deprecated See BEA Commerce product offering
static void printCurrentTime(PrintWriter out)
          Deprecated See BEA Commerce product offering
static void printCurrentTime(PrintWriter out, boolean showThread)
          Deprecated See BEA Commerce product offering
static long profileFinish(String taskName, long startTime)
          Deprecated See BEA Commerce product offering
static long profileFinish(String taskName, long startTime, long finishTime, boolean verbose)
          Deprecated See BEA Commerce product offering
static long profileStart()
          Deprecated See BEA Commerce product offering
static void setConsole()
          Deprecated See BEA Commerce product offering
static void setConsole(boolean value)
          Deprecated See BEA Commerce product offering
static PrintWriter setPrintWriter(PrintWriter writer)
          Deprecated See BEA Commerce product offering
static void stackTrace()
          Deprecated See BEA Commerce product offering
static void warn(String s)
          Deprecated See BEA Commerce product offering
static void warn(String s, boolean newline)
          Deprecated See BEA Commerce product offering
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logDir

public static String logDir
Deprecated See BEA Commerce product offering
Directory holding log output


logFile

public static String logFile
Deprecated See BEA Commerce product offering
The name of the file holding log output


stdoutWriter

public static PrintWriter stdoutWriter
Deprecated See BEA Commerce product offering
output for stdout console logging


stderrWriter

public static PrintWriter stderrWriter
Deprecated See BEA Commerce product offering
output for stderr console logging


logWriter

public static PrintWriter logWriter
Deprecated See BEA Commerce product offering
output for stderr console logging


consoleMode

public static boolean consoleMode
Deprecated See BEA Commerce product offering
flag for logging to console in addition to log file


T_SEP

public static final String T_SEP
Deprecated See BEA Commerce product offering
See Also
Constants Summary
Constructor Detail

Log

public Log()
Deprecated See BEA Commerce product offering

Method Detail

setConsole

public static void setConsole()
Deprecated See BEA Commerce product offering

Sets the console flag to true causing all logging to be sent to the tty


clearConsole

public static void clearConsole()
Deprecated See BEA Commerce product offering

Sets the consoleMode flag to false stopping logging to the tty.


setConsole

public static void setConsole(boolean value)
Deprecated See BEA Commerce product offering

Sets the consoleMode flag controlling logging to the tty.


getStdoutWriter

public static PrintWriter getStdoutWriter()
Deprecated See BEA Commerce product offering

Synchronize on this writer if used in a multi-threaded environment.


getStderrWriter

public static PrintWriter getStderrWriter()
Deprecated See BEA Commerce product offering

Synchronize on this writer if used in a multi-threaded environment.


getPrintWriter

public static PrintWriter getPrintWriter()
Deprecated See BEA Commerce product offering

Synchronize on this writer if used in a multi-threaded environment.


setPrintWriter

public static PrintWriter setPrintWriter(PrintWriter writer)
Deprecated See BEA Commerce product offering

Synchronize on this writer if used in a multi-threaded environment.


profileStart

public static long profileStart()
Deprecated See BEA Commerce product offering

Returns
the startTime used in profileFinish

profileFinish

public static long profileFinish(String taskName,
                                 long startTime)
Deprecated See BEA Commerce product offering

Logs the start, finished, and elapsed time for the given task For example,
 long startTime = Log.profileStart();
 ...do some stuff...
 Log.profileFinish("MyApp.TaskName", startTime);
 

Parameters
taskName - A short name for the task -- no spaces
startTime - from profileStart

profileFinish

public static long profileFinish(String taskName,
                                 long startTime,
                                 long finishTime,
                                 boolean verbose)
Deprecated See BEA Commerce product offering


info

public static void info(String s)
Deprecated See BEA Commerce product offering

Sends string to info log with newline


info

public static void info(String s,
                        boolean newline)
Deprecated See BEA Commerce product offering

Sends string to info log with optional newline


debug

public static void debug(Throwable e)
Deprecated See BEA Commerce product offering

Prints a stackTrace for the given exception to error log


debug

public static void debug(Object o,
                         String s)
Deprecated See BEA Commerce product offering

Sends string (prepended with class name) to debug log with newline


debug

public static void debug(String s)
Deprecated See BEA Commerce product offering

Sends string to debug log with newline


debug

public static void debug(String s,
                         boolean newline)
Deprecated See BEA Commerce product offering

Sends string to debug log with optional newline


error

public static void error(Object o,
                         String s)
Deprecated See BEA Commerce product offering

Sends string (prepended with class name) to error log with newline


error

public static void error(String s)
Deprecated See BEA Commerce product offering

Sends string to error log with newline


error

public static void error(String s,
                         boolean newline)
Deprecated See BEA Commerce product offering

Sends string to error log with optional newline


stackTrace

public static void stackTrace()
Deprecated See BEA Commerce product offering

Prints a stackTrace marking the current stack to error log


exception

public static void exception(Throwable e)
Deprecated See BEA Commerce product offering

Prints a stackTrace for the given exception to error log


error

public static void error(Throwable e)
Deprecated See BEA Commerce product offering

Prints a stackTrace for the given exception to error log


fatal

public static void fatal(Throwable e,
                         int exitVal)
Deprecated See BEA Commerce product offering

WARNING: calls System.exit() to kill the VM


fatal

public static void fatal(String s,
                         int exitVal)
Deprecated See BEA Commerce product offering

WARNING: calls System.exit() to kill the VM


getStackTrace

public static String getStackTrace(Throwable e)
Deprecated See BEA Commerce product offering

Returns
String with stack trace information for given exception

warn

public static void warn(String s)
Deprecated See BEA Commerce product offering

Sends string to warn log with newline


warn

public static void warn(String s,
                        boolean newline)
Deprecated See BEA Commerce product offering

Sends string to warn log with optional newline


currentTime

public static String currentTime()
Deprecated See BEA Commerce product offering

Returns
The current time and thread name formatted for logging

printCurrentTime

public static void printCurrentTime(PrintWriter out)
Deprecated See BEA Commerce product offering


printCurrentTime

public static void printCurrentTime(PrintWriter out,
                                    boolean showThread)
Deprecated See BEA Commerce product offering



Copyright © 2008 BEA Systems, Inc. All Rights Reserved