Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.9.0)

E52932-01


oracle.adfinternal.model.logging.contextual.logger.functional
Interface BasicFunctionalLogger

All Superinterfaces:
BasicContextualLogger, BasicLogger
All Known Subinterfaces:
FunctionalLogger
All Known Implementing Classes:
DefaultFunctionalLogger

public interface BasicFunctionalLogger
extends BasicContextualLogger

A functional logger is a special type of contextual logger in the following sense:

  1. Log messages will be published using a special format which can be interpreted by the Oracle Diagnostic Log Analyzer tool (ODLA), currently available in JDeveloper.
  2. This special format supports delimitation of functional logging sections that can be nested. ODLA's ADF Request tree view will render these sections as individual branches, and each nested section will be displayed as a subtree of the outter section.
  3. Log messages will accept an additional payload called context data, which will receive special treatment by ODLA.

The functional logging sections describe above are handled by a functional logger as "functional activities", which are intended to capture delimited portions of a logical flow.

Bellow is an example of how to log functional activities:


BasicFunctionalLogger logger = getMyFuntionalLogger();
logger.beginActivity(Level.INFO, "My main function");
try
{

// My main function flows here

}
finally
{

logger.endCurrentActivity();

}

It is very important that consumers do match calls to beginActivity with corresponding calls to endCurrentActivity in order to guarantee proper rendering in ODLA's tree view.

Since:
11.1.1.7.2
See Also:
ADFLogger

Method Summary
 void addContextData(java.util.logging.Level level, java.util.Map<java.lang.String,java.lang.String> contextData)
          This method will add the given context data map's content to the current functional activity started by the latest call to beginActivity.
 void addContextData(java.util.logging.Level level, java.lang.String name, java.lang.String value)
          This method will add the given name/value pair as additional context data to the current functional activity started by the latest call to beginActivity.
 void addContextData(java.util.Map<java.lang.String,java.lang.String> contextData)
          This method will add the given context data map's content to the current functional activity started by the latest call to beginActivity.
 void addContextData(java.lang.String name, java.lang.String value)
          This method will add the given name/value pair as additional context data to the current functional activity started by the latest call to beginActivity.
 void beginActivity(java.util.logging.Level level, java.lang.String activity)
          This method will start a new functional activity section in the log, if and only if the the logger is currently set to publish messages at the specified level.
 void beginActivity(java.util.logging.Level level, java.lang.String activity, java.util.Map<java.lang.String,java.lang.String> contextData)
          This method will start a new functional activity section in the log, if and only if the the logger is currently set to publish messages at the specified level.
 void endCurrentActivity()
          This method will mark the end of the current functional activity section in the log.
 void endCurrentActivity(java.util.Map<java.lang.String,java.lang.String> contextData)
          This method will mark the end of the current functional activity section in the log.
 void endCurrentActivity(java.lang.Throwable error)
          This method will mark the end of the current functional activity section in the log, adding details of the given error as context data to the ending activity.
 void endCurrentActivity(java.lang.Throwable error, java.util.Map<java.lang.String,java.lang.String> contextData)
          This method will mark the end of the current functional activity section in the log, adding details of the given error plus the given context data map's content to the ending functional activity.
 java.lang.String getComponent()
          Get the logging component name determined by the logger's domain
 java.lang.String getCurrentActivity()
          Retrieve the name of the current functional activity started by the latest call to beginActivity, if any.
 void log(java.util.logging.Level level, java.lang.String message, java.util.Map<java.lang.String,java.lang.String> contextData)
          Log a message at the specified level, if and only if the logger is currently set to publish messages at that level.
 void log(java.util.logging.Level level, java.lang.String message, java.lang.Throwable error, java.util.Map<java.lang.String,java.lang.String> contextData)
          Log a message at the specified level, if and only if the logger is currently set to publish messages at that level.
 void log(java.util.logging.Level level, java.lang.Throwable error, java.util.Map<java.lang.String,java.lang.String> contextData)
          Log a message at the specified level, based on the given error, if and only if the logger is currently set to publish messages at that level.

 

Methods inherited from interface oracle.adfinternal.model.logging.contextual.BasicContextualLogger
close

 

Methods inherited from interface oracle.adfinternal.model.logging.logger.BasicLogger
getName, isLoggable, log, log, log

 

Method Detail

getComponent

java.lang.String getComponent()
Get the logging component name determined by the logger's domain
Returns:
The logging component name or null if none was defined

addContextData

void addContextData(java.lang.String name,
                    java.lang.String value)
This method will add the given name/value pair as additional context data to the current functional activity started by the latest call to beginActivity.
Parameters:
name - Name of the context data property
value - Value of the context data property

addContextData

void addContextData(java.util.Map<java.lang.String,java.lang.String> contextData)
This method will add the given context data map's content to the current functional activity started by the latest call to beginActivity.
Parameters:
contextData - Map with context data properties to add to the current functional activity

addContextData

void addContextData(java.util.logging.Level level,
                    java.lang.String name,
                    java.lang.String value)
This method will add the given name/value pair as additional context data to the current functional activity started by the latest call to beginActivity.
Parameters:
level - Logging level at which the method will be effective
name - Name of the context data property
value - Value of the context data property

addContextData

void addContextData(java.util.logging.Level level,
                    java.util.Map<java.lang.String,java.lang.String> contextData)
This method will add the given context data map's content to the current functional activity started by the latest call to beginActivity.
Parameters:
level - Logging level at which the method will be effective
contextData - Map with context data properties to add to the current functional activity

log

void log(java.util.logging.Level level,
         java.lang.String message,
         java.util.Map<java.lang.String,java.lang.String> contextData)
Log a message at the specified level, if and only if the logger is currently set to publish messages at that level. In addition, this method will also add the given context data map's content to the latest functional activity started by the latest call to beginActivity.
Parameters:
level - The level which the message should be logged at
message - The message to be logged
contextData - Optional map with context data properties to add to the current functional activity

log

void log(java.util.logging.Level level,
         java.lang.String message,
         java.lang.Throwable error,
         java.util.Map<java.lang.String,java.lang.String> contextData)
Log a message at the specified level, if and only if the logger is currently set to publish messages at that level. In addition, this method will also add the given context data map's content to the latest functional activity started by the latest call to beginActivity.
Parameters:
level - The level which the message should be logged at
message - The message to be logged
error - Error which to include relevant details from. It is up to each implementation to decide which details are relevant.
contextData - Optional map with context data properties to add to the current functional activity

log

void log(java.util.logging.Level level,
         java.lang.Throwable error,
         java.util.Map<java.lang.String,java.lang.String> contextData)
Log a message at the specified level, based on the given error, if and only if the logger is currently set to publish messages at that level. In addition, this method will also add the given context data map's content to the latest functional activity started by the latest call to beginActivity.
Parameters:
level - The level which the message should be logged at
error - Error which to derive the log message and also include relevant details from. It is up to each implementation to decide the log message and which details are relevant to include.
contextData - Optional map with context data properties to add to the current functional activity

beginActivity

void beginActivity(java.util.logging.Level level,
                   java.lang.String activity)
This method will start a new functional activity section in the log, if and only if the the logger is currently set to publish messages at the specified level.
Parameters:
level - Logging level at which the method will be effective
activity - The functional activity's name

beginActivity

void beginActivity(java.util.logging.Level level,
                   java.lang.String activity,
                   java.util.Map<java.lang.String,java.lang.String> contextData)
This method will start a new functional activity section in the log, if and only if the the logger is currently set to publish messages at the specified level. In addition, this method will also add the given context data map's content to the new functional activity.
Parameters:
level - Logging level at which the method will be effective
activity - The functional activity's name
contextData - Optional map with context data properties to add to the new functional activity

endCurrentActivity

void endCurrentActivity()
This method will mark the end of the current functional activity section in the log.

endCurrentActivity

void endCurrentActivity(java.util.Map<java.lang.String,java.lang.String> contextData)
This method will mark the end of the current functional activity section in the log. In addition, this method will also add the given context data map's content to the ending functional activity.
Parameters:
contextData - Optional map with context data properties to add to the current functional activity

endCurrentActivity

void endCurrentActivity(java.lang.Throwable error)
This method will mark the end of the current functional activity section in the log, adding details of the given error as context data to the ending activity.
Parameters:
error - Error which to include relevant details from. It is up to each implementation to decide which details are relevant.

endCurrentActivity

void endCurrentActivity(java.lang.Throwable error,
                        java.util.Map<java.lang.String,java.lang.String> contextData)
This method will mark the end of the current functional activity section in the log, adding details of the given error plus the given context data map's content to the ending functional activity.
Parameters:
error - Error which to include relevant details from. It is up to each implementation to decide which details are relevant.
contextData - Optional map with context data properties to add to the current functional activity

getCurrentActivity

java.lang.String getCurrentActivity()
Retrieve the name of the current functional activity started by the latest call to beginActivity, if any.
Returns:
The current activity's name or null if there's none.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.9.0)

E52932-01


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