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.
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
A handler that writes formatted log records either to a single file, or to a set of rotating log files.
A simple handler for writing formatted records to System.err
To send logs to a file, add FileHandler to the handlers property in the logging.properties file. This will enable file logging globally.
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.
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
A Logger is used to log messages for a specific component. Oracle Adaptive Access Manager Loggers are described in Table H-2.
ADF Models package, all classes with package starting with oracle.oaam.model
ADF View package, all classes with package starting with oracle.oaam.view
Alerts, rules engine specifically uses this logger so that custom handlers can consume these log records
root Logger controls all oaam logging
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:
Enable Debug Log
Example, to enable debug logs:
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:
Configure all logs to use FINER logging (include debug)
To configure oracle.oaam to use FINER logging (include debug)
To redirect oracle.oaam and child logs to file handler (oaam.log), set the following property:
If you want logs to go to both console and file, comment the following property:
To instruct java to use this configuration file instead of $JDK_HOME/jre/lib/logging.properties: