Any custom
applications such as, event handlers, schedule task, connectors, etc., to debug
in the OIM 11g Server, we need to enable the logging.
Pre-Requisite
You need to add the logging configuration code in java class.
You need to add the logging configuration code in java class.
import java.util.logging.Level; import java.util.logging.Logger; private Logger logger=Logger.getLogger("blog.chella"); //Class name is blog.chella
Configuration of logs in logging.xml
Go to the $DOMAIN_HOME/config/fmwconfig/servers/OIM_SERVER directory and edit the logging.xml file.
Include log_handler inside log_handlers
<log_handlers> <log_handler name='bloghandler' level='FINEST' class='oracle.core.ojdl.logging.ODLHandlerFactory'> <property name='logreader:' value='off'/> <property name='path' value=/opt/chella/oimlogs'/> <property name='format' value='ODL-Text'/> <property name='useThreadName' value='true'/> <property name='locale' value='en'/> <property name='maxFileSize' value='5242880'/> <property name='maxLogSize' value='52428800'/> <property name='encoding' value='UTF-8'/> </log_handler> </log_handlers>
Include
logger inside loggers
<loggers> <logger name="Logger-Name" level="LOG LEVEL" useParentHandlers="false"> <handler name="blog.chella"/> <handler name="console-handler"/> </logger> </loggers>
Log Level
|
ODL Msg:Level
|
Description
|
SEVERE.intValue()+100
|
INCIDENT_ERROR:1
|
Serious
problem caused by bug in product
|
SEVERE
|
ERROR:1
|
A
serious problem but is not caused by a bug in the product.
|
WARNING
|
WARNING:1
|
A
potential problem
|
INFO
|
NOTIFICATION:1
|
A
major lifecycle event
|
CONFIG
|
NOTIFICATION:16
|
A
finer level of granularity for reporting normal events.
|
FINE
|
TRACE:1
|
Trace
or debug information for events
|
FINER
|
TRACE:16
|
Detailed
trace or debug information
|
FINEST
|
TRACE:32
|
Very
detailed trace or debug information
|
The FINEST log level will give the more detailed info. If you want to debug your connectors, schedule task, event handlers, etc, you can use FINEST log level.
Note: Make sure you
have disabled FINEST level in production.