Pages

Friday, July 29, 2011

Enabling The Logging in OIM 11g

Any Custom Schedule Task and Event Handlers to debug in the OIM 11g Server to enable the logging. The following way to enable the logging in Oracle Identity Manager 11g.

Pre-Requisite


Java Code Configuration


Add the following line into your java code.

Import Statement

import com.thortech.util.logging.Logger;

private Logger logger=Logger.getLogger("Logger-Name");



Configuration Of Logging


Go to the $DOMAIN_HOME/config/fmwconfig/servers/oim_server1 directory and edit the logging.xml file.

Configure The Log Handler

<log_handler name='logger Handel Name' level='FINEST' class='oracle.core.ojdl.logging.ODLHandlerFactory'>
<property name='logreader:' value='off'/>
<property name='path' value='Log File Location'/>
<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'/>

Include The Logger Handler Logger Configuration

<logger name="Logger-Name" level="Log Level" useParentHandlers="false">
<handler name="logger-Handel-Name"/>
<handler name="console-handler"/>
</logger>

Oracle Identity Manager 11G Log Levels


Log Level                                         ODL Message Type:Level

SEVERE.intValue()+100                  INCIDENT_ERROR:1
SEVERE                                           ERROR:1
WARNING                                       WARNING:1
INFO                                                 NOTIFICATION:1
CONFIG                                           NOTIFICATION:16
FINE                                                 TRACE:1
FINER                                               TRACE:16
FINEST                                             TRACE:32

The FINEST log level will give the more debug info. If you want to debug your schedule task or event handlers, please use FINEST Log level.

2 comments:

  1. I had to use the class oracle.core.ojdl.logging.ODLLogger to make it worked.
    import oracle.core.ojdl.logging.ODLLogger;
    ...
    privat ODLLogger logger = ODLLogger.getODLLogger("Logger name here")

    Provide the "Logger name" and not the "Log handler name" to getODLLogger.

    ReplyDelete
  2. Hi,

    I have created Post process eventhandler with the same step provided in the blog.And users password are generated and stored in Oracle DB .But email notification has been sent to users.

    Let me know if any email server have to be configured or any configuration is missing.

    ReplyDelete