Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1)

E12063-04

oracle.dss.util.xdo.common.log
Class LogImpl

java.lang.Object
  extended by oracle.dss.util.xdo.common.log.LogImpl

Deprecated. Please use oracle.dss.util.xdo.common.log.XDOLog and its implementations.

public class LogImpl
extends java.lang.Object

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.

There are 2 places to set the logging level. One is the system logging level, another one is the logging level for each log message. Only log messages which have a level greater than or equal to the system logging level will be logged. When you set the system logging level to 'OFF', no log info will be displayed. You can set the system logging level by calling setLevel() method. The default system logging level is EXCEPTION. You can set the logging level for each log message by passing the level parameter to each log() method.

Please refer the AOLJ javadoc for more detail. http://www-apps.us.oracle.com/atg/java/javadoc/doctop/

See Also:
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

RCS_ID

public static final java.lang.String RCS_ID
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

LogImpl

public LogImpl(java.io.Writer pOut)
Deprecated. 
Constructor.

Parameters:
pOut - Logging destination

LogImpl

public LogImpl(java.io.OutputStream pOut)
Deprecated. 
Constructor.

Log message will be written in UTF-8.

Parameters:
pOut - Logging destination

LogImpl

public LogImpl(java.lang.String pFilename)
Deprecated. 
Constructor.

Log message will be written in UTF-8. If any problem happens with the log file,

Parameters:
pFilename - Logging destination

LogImpl

public LogImpl()
Deprecated. 
Constructor.

Log message will be written in UTF-8. If any problem happens with the log file,

Method Detail

setDestination

public void setDestination(java.io.Writer pOut)
Deprecated. 
Sets the logging destination.

Parameters:
pOut - Logging destination

setDestination

public void setDestination(java.io.OutputStream pOut)
Deprecated. 
Sets the logging destination.

Parameters:
pOut - Logging destination

setLevel

public void setLevel(int pLevel)
Deprecated. 
Set the logging level. It can use one of the 7 values: The levels are listed in descending order of severity. Only log messages which have a level greater than or equal to the set value will be displayed.

When you set the value to 'OFF', no log info will be displayed.

Parameters:
pLevel - System logging level

setModule

public void setModule(java.lang.String pModule)
Deprecated. 
Sets the class/package for which logging should be turned on. Only log messages which belong to the same module will be displayed. In its internal, it does the forward matching with the absolute class name of the object passed by 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".

Parameters:
pModule - Module name to be logged

write

public void write(java.lang.Object pThis,
                  java.lang.String pString,
                  int pLevel)
Deprecated. 
Write a log.

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 text
 
Usually you can pass "this" for the first parameter to log in order to specify the current object in the log.

Parameters:
pThis - Current object
pString - Log message
pLevel - Logging level

write

public void write(java.lang.String pString,
                  int pLevel)
Deprecated. 
Write a log. This message will be logged regardless of the module setting by setModule() method.

Parameters:
pString - Log message
pLevel - Logging level
See Also:
write(Object, String, int), setModule(String)

writeEncoded

public void writeEncoded(java.lang.Object pThis,
                         java.lang.String pStringe,
                         int pLevel)
Deprecated. 
Not implemented.


write

public void write(java.lang.Object pThis,
                  java.lang.Throwable pError,
                  int pLevel)
Deprecated. 
Not implemented.


test

public boolean test(java.lang.Object pThis,
                    int pLevel)
Deprecated. 
Not implemented.


isEnabled

public boolean isEnabled(int pLevel)
Deprecated. 
Checks whether logging is enabled for this level. For performance reasons, User must check this before constructing any new Objects for logging.

Parameters:
pLevel - the level of the message
Returns:
true if logging is enabled for pLevel false if logging is not.

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1)

E12063-04

Copyright © 1997, 2010, Oracle. All rights reserved.