|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.objectwave.logging.ConsoleImpl
Display logging information to the System.out stream.
| Nested Class Summary | |
static class |
ConsoleImpl.Test
|
| Field Summary | |
protected static java.text.DateFormat |
dateFormat
|
protected boolean |
debugOn
|
protected static java.lang.ThreadLocal |
traceHolder
|
| Constructor Summary | |
ConsoleImpl()
|
|
| Method Summary | |
void |
debug(java.lang.Object source,
java.lang.String message)
Dump text to string with a priority of debug. |
void |
debug(java.lang.Object source,
java.lang.String message,
java.lang.Throwable cause)
Dump text to string with a priority of debug. |
void |
error(java.lang.Object source,
java.lang.String message,
java.lang.Throwable cause)
Dump text to string with a priority of error. |
protected java.lang.String |
formatCategory(java.lang.String text)
Decorate the text with any tracing information. |
protected java.lang.String |
formatMessage(java.lang.String text)
|
protected java.lang.String |
getCategoryId(java.lang.Object source)
Categories are identified by the package name of the object. |
void |
info(java.lang.Object source,
java.lang.String message)
Dump text to string with a priority of info. |
boolean |
isDebugEnabled(java.lang.Object source)
isDebugEnabled for the given source. |
static void |
setDateFormat(java.text.DateFormat format)
Allow the customization of the date format. |
void |
setDebugEnabled(java.lang.Object source,
boolean value)
Allow the debug output to be disabled. |
void |
track(java.lang.String categoryName,
Trace codeBlock)
Run the provided code block and decorate any resulting log messages with specified category. |
void |
warn(java.lang.Object source,
java.lang.String message)
Dump text to string with a priority of warn. |
void |
warn(java.lang.Object source,
java.lang.String message,
java.lang.Throwable cause)
Dump text to string with a priority of warn. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static java.lang.ThreadLocal traceHolder
protected static java.text.DateFormat dateFormat
protected boolean debugOn
| Constructor Detail |
public ConsoleImpl()
| Method Detail |
public static void setDateFormat(java.text.DateFormat format)
format - The new DateFormat value
public void setDebugEnabled(java.lang.Object source,
boolean value)
source - The new DebugEnabled valuevalue - The new DebugEnabled valuepublic boolean isDebugEnabled(java.lang.Object source)
isDebugEnabled in interface LogIFsource - Source will resolve to a category - not used right now.
protected java.lang.String getCategoryId(java.lang.Object source)
source - An object that is requesting this log to be generated.
protected java.lang.String formatMessage(java.lang.String text)
text -
public void track(java.lang.String categoryName,
Trace codeBlock)
throws java.lang.Exception
track in interface LogIFcategoryName - codeBlock -
java.lang.Exception
public void info(java.lang.Object source,
java.lang.String message)
info in interface LogIFsource - Source will resolve to a category id.message - The text to display.
public void warn(java.lang.Object source,
java.lang.String message)
warn in interface LogIFsource - Source will resolve to a category id.message - The text to display.
public void warn(java.lang.Object source,
java.lang.String message,
java.lang.Throwable cause)
warn in interface LogIFsource - Source will resolve to a category id.message - The text to display.cause -
public void debug(java.lang.Object source,
java.lang.String message)
debug in interface LogIFsource - Source will resolve to a category id.message - The text to display.
public void debug(java.lang.Object source,
java.lang.String message,
java.lang.Throwable cause)
debug in interface LogIFsource - Source will resolve to a category id.message - The text to display.cause - Description of Parameter
public void error(java.lang.Object source,
java.lang.String message,
java.lang.Throwable cause)
error in interface LogIFsource - Source will resolve to a category id.message - The text to display.cause - Description of Parameterprotected java.lang.String formatCategory(java.lang.String text)
text -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||