2 Replies Latest reply: Nov 21, 2012 8:51 AM by 879020 RSS

    OIM Suggested logging - 11g release2

    879020
      Hi,

      In my custom developed tasks or handlerS I want to log some data , right now I am printing in system.out, what is the suggested way for logging? We Should use log4j or OIM api serves as some futures for that?


      Thank you in advance,
      BR
      Aliye
        • 1. Re: OIM Suggested logging - 11g release2
          Nishith Nayan
          you can use ODL instead of log4j .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. Re: OIM Suggested logging - 11g release2
            879020
            Thanks a lot Nayan!


            Aliye