Enabling Logging

To enable logging in Oracle WebLogic Server:

  1. Edit the logging.xml file as follows:

    1. Add the following blocks in the file:

      <log_handler name='genericSCIM-handler' level='[LOG_LEVEL]' class='oracle.core.ojdl.logging.ODLHandlerFactory'>
      <property name='logreader:' value='off'/>
      <property name='path' value='[FILE_NAME]'/>
      <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>
      
      <logger name="ORG.IDENTITYCONNECTORS.GENERICSCIM" level="[LOG_LEVEL]"useParentHandlers="false">
      <handler name="genericSCIM-handler"/><handler name="console-handler"/>
      </logger>
      <logger name="ORG.IDENTITYCONNECTORS.SCIMCOMMON.UTILS.SCIMCOMMONUTILS"level="[LOG_LEVEL]" useParentHandlers="false">
      <handler name="genericSCIM-handler"/><handler name="console-handler"/>
      </logger>
    2. Replace all occurrences of [LOG_LEVEL] with the ODL message type and level combination that you require. Table 3-1 lists the supported message type and level combinations.

      Similarly, replace [FILE_NAME] with the full path and name of the log file in which you want log messages specific to connector operations to be recorded.

      The following blocks show sample values for [LOG_LEVEL] and [FILE_NAME] :

      <log_handler name='genericSCIM-handler' level='NOTIFICATION:1' class='oracle.core.ojdl.logging.ODLHandlerFactory'>
      <property name='logreader:' value='off'/>
      <property name='path' value='/<%OIM_DOMAIN%>/servers/oim_server1/ logs/genericSCIMLogs.log>"
      <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>
      
      <logger name="ORG.IDENTITYCONNECTORS.GENERICSCIM" level="NOTIFICATION:1"
      useParentHandlers="false">
      <handler name="genericSCIM-handler"/>
      <handler name="console-handler"/>
      </logger>
      <logger name="ORG.IDENTITYCONNECTORS.SCIMCOMMON.UTILS.SCIMCOMMONUTILS"
      level="NOTIFICATION:1" useParentHandlers="false">
      <handler name="genericSCIM-handler"/>
      <handler name="console-handler"/>
      </logger>
      

    With these sample values, when you use Oracle Identity Manager, all messages generated for this connector that are of a log level equal to or higher than the NOTIFICATION:1 level are recorded in the specified file.

  2. Save and close the file.

  3. Set the following environment variable to redirect the server logs to a file:

    For Microsoft Windows:

    set WLS_REDIRECT_LOG=FILENAME
    

    For UNIX:

    export WLS_REDIRECT_LOG=FILENAME
    

    Replace FILENAME with the location and name of the file to which you want to redirect the output.

  4. Restart the application server.