|
Rakesh API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbiz.wedoit4u.Logger
public class Logger
Utility class that is used to log errors/warnings/information
to output files or to a back end database.
Copyright 2003, Rakesh Vidyadharan and wedoit4u.biz
| Field Summary | |
|---|---|
static java.lang.String |
ERROR_LOG_PROPERTY
The property that is used to denote the error log. |
private static java.io.PrintStream |
errorStream
The PrintStream to which error messages are to be
written. |
static java.lang.String |
OUT_LOG_PROPERTY
The property that is used to denote the out log. |
private static java.io.PrintStream |
outStream
The PrintStream to which the messages are to be
written. |
| Constructor Summary | |
|---|---|
Logger()
|
|
| Method Summary | |
|---|---|
static void |
error(java.lang.String message)
Log the specified error message to the errorStream. |
static void |
error(java.lang.String message,
java.lang.Throwable throwable)
Log the specified error message to the errorStream. |
static java.lang.String |
getHTMLStackTrace(java.lang.Throwable throwable)
Utility method that prints out the entire stack trace
for the specified instance of Throwable in HTML
. |
static java.lang.String |
getStackTrace(java.lang.Throwable throwable)
Utility method that prints out the entire stack trace
for the specified instance of Throwable. |
static void |
message(java.lang.String message)
Log the specified message to the outStream. |
private static java.lang.String |
printHTMLTrace(java.lang.Throwable throwable)
Return the stack trace for the specified instance
of Throwable. |
private static java.lang.String |
printTrace(java.lang.Throwable throwable)
Return the stack trace for the specified instance
of Throwable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ERROR_LOG_PROPERTY
public static final java.lang.String OUT_LOG_PROPERTY
private static java.io.PrintStream errorStream
PrintStream to which error messages are to be
written.
private static java.io.PrintStream outStream
PrintStream to which the messages are to be
written.
| Constructor Detail |
|---|
public Logger()
| Method Detail |
|---|
public static final void error(java.lang.String message)
errorStream.
message - - The error message to log.
public static final void error(java.lang.String message,
java.lang.Throwable throwable)
errorStream.
Print the StackTraceElement associated with the
specified instance of Throwable as well.
message - - The error message to logthrowable - - The instance of Throwable whose
StackTrace is to be logged.public static final void message(java.lang.String message)
outStream.
public static final java.lang.String getStackTrace(java.lang.Throwable throwable)
stack trace
for the specified instance of Throwable. This method
just uses the StackTraceElement class methods
to create the String that represents the entire
stack trace.
throwable - - The instance of Throwable
whose entire stack trace is to be retrieved.private static final java.lang.String printTrace(java.lang.Throwable throwable)
stack trace for the specified instance
of Throwable.
throwable - - The instance of Throwable
whose stack trace is to be retrieved.public static final java.lang.String getHTMLStackTrace(java.lang.Throwable throwable)
stack trace
for the specified instance of Throwable in HTML
. This method just uses the StackTraceElement class
methods to create the HTML String that represents the
entire stack trace.
throwable - - The instance of Throwable
whose entire stack trace is to be retrieved.private static final java.lang.String printHTMLTrace(java.lang.Throwable throwable)
stack trace for the specified instance
of Throwable.
throwable - - The instance of Throwable
whose stack trace is to be retrieved.
|
Rakesh API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||