|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.datatools.modelbase.sql.query.util.SQLLogUtil
This class provides the logging and tracing facility using Eclipse standard logging machanism.
Constructor Summary | |
SQLLogUtil(Plugin plugin)
|
Method Summary | |
Plugin |
getCurrentPlugin()
|
boolean |
isTracing()
Gets whether or not tracing is active. |
void |
setCurrentPlugin(Plugin currentPlugin)
|
void |
write(java.lang.Object obj)
Logs an error described by an object. |
void |
write(java.lang.String text)
Logs an error described by a text. |
void |
write(java.lang.Throwable throwable)
Logs an error described by a throwable. |
void |
writeInfo(java.lang.String text)
Logs an information described by a text. |
void |
writeLog(java.lang.Object obj)
Logs an error described by an object. |
void |
writeLog(java.lang.String text)
Logs an error described by a text. |
void |
writeLog(java.lang.Throwable throwable)
Logs an error described by a throwable. |
void |
writeTrace(java.lang.String text)
Traces the given string. |
void |
writeTraceEntry(java.lang.Object[] args)
Traces a method entry and optionally the method's arguments. |
boolean |
writeTraceExit(boolean returnValue)
Traces a method exit and optionally the method's return value. |
int |
writeTraceExit(int returnValue)
Traces a method exit and optionally the method's return value. |
java.lang.Object |
writeTraceExit(java.lang.Object returnValue)
Traces a method exit and optionally the method's return value. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SQLLogUtil(Plugin plugin)
Method Detail |
public Plugin getCurrentPlugin()
public void setCurrentPlugin(Plugin currentPlugin)
currentPlugin
- The currentPlugin to set.public boolean isTracing()
public void write(java.lang.Throwable throwable)
This method should be used whenever a class in this plugin has to log an error since it adheres to the global logging strategy.
throwable
- public void write(java.lang.String text)
This method should be whenever a class in this plugin has to log an error since it adheres to the global logging strategy.
text
- public void write(java.lang.Object obj)
This method should be whenever a class in this plugin has to log an error since it adheres to the global logging strategy.
obj
- public void writeInfo(java.lang.String text)
This method should be whenever a class in this plugin has to log an information since it adheres to the global logging strategy.
text
- public void writeLog(java.lang.Throwable throwable)
This method should be used whenever a class in this plugin has to log an error since it adheres to the global logging strategy.
throwable
- public void writeLog(java.lang.String text)
This method should be whenever a class in this plugin has to log an error since it adheres to the global logging strategy.
text
- public void writeLog(java.lang.Object obj)
This method should be whenever a class in this plugin has to log an error since it adheres to the global logging strategy.
public void writeTrace(java.lang.String text)
This method is used to trace intermediate results in a method. The calls writeTraceEntry and writeTraceExit can be used to provide context for this trace entry.
text
- the text to write to the trace logpublic void writeTraceEntry(java.lang.Object[] args)
This method should be used to log the control flow in this plugin since it adheres to the global logging strategy.
args
- optional Object[]
the arguments for the method
invokation, Note: args[i].toString()
will be called to create the trace messagepublic boolean writeTraceExit(boolean returnValue)
This method should be used to log the control flow in this plugin since it adheres to the global logging strategy.
returnValue
- the return value of the method to be traced,
returnValue
public int writeTraceExit(int returnValue)
This method should be used to log the control flow in this plugin since it adheres to the global logging strategy.
returnValue
- the return value of the method to be traced,
returnValue
public java.lang.Object writeTraceExit(java.lang.Object returnValue)
This method should be used to log the control flow in this plugin since it adheres to the global logging strategy.
returnValue
- optional the return value of the
method to be traced,
Note: returnValue.toString()
will be called to
create the trace message
returnValue
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |