JDK Logging

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

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