Skip Headers
Oracle® Fusion Middleware Administrator's Guide for Oracle Adaptive Access Manager
Release 11g (11.1.1)

Part Number E14568-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

H Configuring Logging Output

Logging is the mechanism by which components write messages to a file.

Oracle Adaptive Access Manager 11g components use the package java.util.logging as part of its logging infrastructure. This package is available in all Java environments.

The logging configuration can be initialized using a logging configuration file that will be read at startup.

The default logging configuration file, logging.properties, is located in the Home directory. It configures the Oracle Adaptive Access Manager Framework loggers to print messages. You can edit the file to specify the level of detail in the log messages. For example, you can specify whether log messages are sent to the console, to a file or to both. In addition, you can specify logging at the level of individual areas for which a logger is defined.

H.1 Handlers

The Java logging utility, java.util.logging, uses handler classes to output log messages.

Appendix H shows the handlers used by Oracle Adaptive Access Manager

Table H-1 Handler Classes

Handler Class Function

FileHandler

A handler that writes formatted log records either to a single file, or to a set of rotating log files.

ConsoleHandler

A simple handler for writing formatted records to System.err


H.1.1 Configuring the File handler

To send logs to a file, add FileHandler to the handlers property in the logging.properties file. This will enable file logging globally.

handlers= java.util.logging.FileHandler

Configure the handler by setting the following properties:

java.util.logging.FileHandler.pattern=<home directory>/logs/oaam.log
java.util.logging.FileHandler.limit=50000
java.util.logging.FileHandler.count=1
java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter

java.util.logging.FileHandler.pattern specifies the location and pattern of the output file. The default setting is your home directory.

java.util.logging.FileHandler.limit specifies, in bytes, the maximum amount that the logger writes to any one file.

java.util.logging.FileHandler.count specifies how many output files to cycle through.

java.util.logging.FileHandler.formatter specifies the java.util.logging formatter class that the file handler class uses to format the log messages. SimpleFormatter writes brief "human-readable" summaries of log records.

H.1.2 Configuring Both Console Logging and File Logging

You can set the logging utility to output log messages to both the console and to a file by specifying the console handler and the file handler, separated by a comma, as shown:

handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler

H.2 Oracle Adaptive Access Manager Loggers

A Logger is used to log messages for a specific component. Oracle Adaptive Access Manager Loggers are described in Table H-2.

Table H-2 Oracle Adaptive Access Manager Loggers

Logger Components

oracle.oaam.model

ADF Models package, all classes with package starting with oracle.oaam.model

oracle.oaam.view

ADF View package, all classes with package starting with oracle.oaam.view

oracle.oaam.alerts

Alerts, rules engine specifically uses this logger so that custom handlers can consume these log records

oracle.oaam

root Logger controls all oaam logging


H.3 Logging Levels

Each log message has an associated log Level. The Level gives a rough guide to the importance and urgency of a log message. Each log level has an integer value, with higher values indicating higher priorities.

Levels of logging are ALL, TRACE, FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, and OFF.

Details about Java Logging:

1. Any logging at INFO and above provides complete details

2. SEVERE is used to diagnose if there is improper functioning of the system.

3. Any logging message below INFO should have its logging enabled to check for performance reasons (isDebugEnabled() / isLevelEnabled()).

Property to Control Logging Level

The following property controls the level of logging:

Logger Name=Level

Enable Debug Log

Example, to enable debug logs:

oracle.oaam .level=FINER

Enable Debug Logs for ADF Models

To enable debug logs for ADF models package and reset all information logging, the following entries may be added:

oracle.oaam.level=INFO
oracle.oaam.model.level=FINER

Configure all logs to use FINER logging (include debug)

To configure oracle.oaam to use FINER logging (include debug)

oracle.oaam.level=FINER

H.4 Other Properties

To redirect oracle.oaam and child logs to file handler (oaam.log), set the following property:

oracle.oaam.handlers=java.util.logging.FileHandler

If you want logs to go to both console and file, comment the following property:

oracle.oaam.useParentHandlers=false

To instruct java to use this configuration file instead of $JDK_HOME/jre/lib/logging.properties:

java -Djava.util.logging.config.file=/scratch/user/config/logging.properties