oracle.apps.fnd.wf.common
Class StreamLog

java.lang.Object
  |
  +--oracle.apps.fnd.wf.common.StreamLog
All Implemented Interfaces:
oracle.apps.fnd.common.Log

public class StreamLog
extends java.lang.Object
implements oracle.apps.fnd.common.Log

Simplified version of AppsLog to be used when Apps has NOT been installed.

This class has been written to basically mimic AppsLog. Most importantly, it:

Logging is governed by two parameters:

AFLOG_ENABLED and AFLOG_MODULE are not applicable because logging using this class will always be enabled and all modules will always be logged.


Field Summary
static java.lang.String RCS_ID
           
static boolean RCS_ID_RECORDED
           
 
Fields inherited from interface oracle.apps.fnd.common.Log
ERROR, EVENT, EXCEPTION, OFF, PROCEDURE, STATEMENT, UNEXPECTED
 
Constructor Summary
StreamLog(oracle.apps.fnd.common.Context context)
          Constructs a StreamLog based on the environment store.
 
Method Summary
 void setLevel(int value)
          Sets the log level.
 void setModule(java.lang.String value)
          Module functionality is not supported.
 boolean test(java.lang.Object module, int msgLevel)
          Checks whether logging is enabled for this object and level.
 void write(java.lang.Object module, oracle.apps.fnd.common.Message msg, int msgLevel)
          Currently not supported.
 void write(java.lang.Object module, java.lang.String msg, int msgLevel)
          Writes to the log if logging is enabled.
 void write(java.lang.String msg, int msgLevel)
          Writes to the log if logging is enabled.
 void writeEncoded(java.lang.Object module, java.lang.String msg, int msgLevel)
          Currently not supported.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RCS_ID

public static final java.lang.String RCS_ID

RCS_ID_RECORDED

public static final boolean RCS_ID_RECORDED
Constructor Detail

StreamLog

public StreamLog(oracle.apps.fnd.common.Context context)
          throws WorkflowException
Constructs a StreamLog based on the environment store. Initialization will only once per JVM.
Parameters:
context - Context providing the environment store
Throws:
WorkflowException - Exception
Method Detail

setLevel

public void setLevel(int value)
Sets the log level. If the specified level is not one of the following values, it does nothing and the level will remain at its current value. Therefore, levels other than those defined by Log are not supported.
Specified by:
setLevel in interface oracle.apps.fnd.common.Log
Parameters:
value - Log level

setModule

public void setModule(java.lang.String value)
Module functionality is not supported. All modules will be logged.
Specified by:
setModule in interface oracle.apps.fnd.common.Log
Parameters:
value - Parameter

test

public boolean test(java.lang.Object module,
                    int msgLevel)
Checks whether logging is enabled for this object and level. A user might consider calling this method from an instance method before constructing long debug strings.
Specified by:
test in interface oracle.apps.fnd.common.Log
Parameters:
module - Object writing the message to the log
msgLevel - The level of the message
Returns:
return-value

write

public void write(java.lang.String msg,
                  int msgLevel)
Writes to the log if logging is enabled. Messages written using this method will be given the module name "MODULE_UNKNOWN". Calls write(Object, String, int).
Specified by:
write in interface oracle.apps.fnd.common.Log
Parameters:
msg - String to be written to the log
msgLevel - The level of the message

write

public void write(java.lang.Object module,
                  java.lang.String msg,
                  int msgLevel)
Writes to the log if logging is enabled. Mimics the functionality of AppsLog in order to write a diagnostic message in an AFLOG-compliant format.
Specified by:
write in interface oracle.apps.fnd.common.Log
Parameters:
module - Represents the object or module writing the message to the log. If a String is passed, it should be in the form of [Fully qualified class name].[Method name including arguments].
msg - String to be written to the log
msgLevel - The level of the message. The message will be displayed only if its level is greater than or equal to that of the Log class.

writeEncoded

public void writeEncoded(java.lang.Object module,
                         java.lang.String msg,
                         int msgLevel)
Currently not supported.
Specified by:
writeEncoded in interface oracle.apps.fnd.common.Log
Parameters:
module - Parameter
msg - Parameter
msgLevel - Parameter

write

public void write(java.lang.Object module,
                  oracle.apps.fnd.common.Message msg,
                  int msgLevel)
Currently not supported.
Specified by:
write in interface oracle.apps.fnd.common.Log
Parameters:
module - Parameter
msg - Parameter
msgLevel - Parameter