|
Oracle Fusion Middleware Java API Reference for Oracle ADF Data Visualization Components 11g Release 1 (11.1.1.1.0) E12063-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.dss.util.xdo.common.log.LogImpl
public class LogImpl
Lightweight logging utility. It implements oracle.apps.fnd.common.Log interface.
We have looked for the light-weight, file/stream-based logging functionality. but all of AOL/J logging functionalities require AppsContext or Apps database so we decided to provide our own light-weight logging utlitity.
This logging utility implements oracle.apps.fnd.common.Log interface so you can switch to use the logging utility provided by AOL/J easily later.
The sample usage is like following.// Log output to stdout Log mLog = new LogImpl(System.out); // Write a log, passing "this" to log the current module name. mLog.write(this, "Error!!!!" mLog.ERROR);You need to pass the destination when you create an instance of this class. You can pass either of a Writer object, an OutputStream object, or a filename String. All the message will be written in UTF-8 encoding when you pass an OutputStream or a filename String. If you need more control on the output encoding, you can create Writer by yourself and tune it, then you can just pass the Writer to the constructor. There are 7 logging levels following. Levels are shown in descending order of severity. The top one is the most severe.
Logger
Field Summary | |
---|---|
static java.lang.String |
RCS_ID
Deprecated. |
Constructor Summary | |
---|---|
LogImpl()
Deprecated. Constructor. |
|
LogImpl(java.io.OutputStream pOut)
Deprecated. Constructor. |
|
LogImpl(java.lang.String pFilename)
Deprecated. Constructor. |
|
LogImpl(java.io.Writer pOut)
Deprecated. Constructor. |
Method Summary | |
---|---|
boolean |
isEnabled(int pLevel)
Deprecated. Checks whether logging is enabled for this level. |
void |
setDestination(java.io.OutputStream pOut)
Deprecated. Sets the logging destination. |
void |
setDestination(java.io.Writer pOut)
Deprecated. Sets the logging destination. |
void |
setLevel(int pLevel)
Deprecated. Set the logging level. |
void |
setModule(java.lang.String pModule)
Deprecated. Sets the class/package for which logging should be turned on. |
boolean |
test(java.lang.Object pThis,
int pLevel)
Deprecated. Not implemented. |
void |
write(java.lang.Object pThis,
java.lang.String pString,
int pLevel)
Deprecated. Write a log. |
void |
write(java.lang.Object pThis,
java.lang.Throwable pError,
int pLevel)
Deprecated. Not implemented. |
void |
write(java.lang.String pString,
int pLevel)
Deprecated. Write a log. |
void |
writeEncoded(java.lang.Object pThis,
java.lang.String pStringe,
int pLevel)
Deprecated. Not implemented. |
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 RCS_ID
Constructor Detail |
---|
public LogImpl(java.io.Writer pOut)
pOut
- Logging destinationpublic LogImpl(java.io.OutputStream pOut)
Log message will be written in UTF-8.
pOut
- Logging destinationpublic LogImpl(java.lang.String pFilename)
Log message will be written in UTF-8. If any problem happens with the log file,
pFilename
- Logging destinationpublic LogImpl()
Log message will be written in UTF-8. If any problem happens with the log file,
Method Detail |
---|
public void setDestination(java.io.Writer pOut)
pOut
- Logging destinationpublic void setDestination(java.io.OutputStream pOut)
pOut
- Logging destinationpublic void setLevel(int pLevel)
When you set the value to 'OFF', no log info will be displayed.
pLevel
- System logging levelpublic void setModule(java.lang.String pModule)
write()
method.
For example, if you pass "java.io"
to this method,
the log mesasges occurred in "java.io.InputStream"
or
"java.io.Writer"
will be logged. If you pass If you pass "all",
it will log everything.
The default is "all".
pModule
- Module name to be loggedpublic void write(java.lang.Object pThis, java.lang.String pString, int pLevel)
Logging message will be like;
[component][logging level] log message text [component][logging level] log message text [component][logging level] log message text [component][logging level] log message text [component][logging level] log message textUsually you can pass "this" for the first parameter to log in order to specify the current object in the log.
pThis
- Current objectpString
- Log messagepLevel
- Logging levelpublic void write(java.lang.String pString, int pLevel)
pString
- Log messagepLevel
- Logging levelwrite(Object, String, int)
,
setModule(String)
public void writeEncoded(java.lang.Object pThis, java.lang.String pStringe, int pLevel)
public void write(java.lang.Object pThis, java.lang.Throwable pError, int pLevel)
public boolean test(java.lang.Object pThis, int pLevel)
public boolean isEnabled(int pLevel)
pLevel
- the level of the message
true
if logging is enabled for pLevel
false
if logging is not.
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Data Visualization Components 11g Release 1 (11.1.1.1.0) E12063-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |