Posted by : Arjun Lagisetty Monday, December 30, 2013

Logging on the agent is very important for debugging purposes. It is one of the best practices to configure the logger for the agent to desired levels which might be different from the default levels. This is especially important if the you are facing an issue which is to be debugged.

Overview:

ODI logging is based on Java logging APIs. ODI agent logs via OJDL These logs can be configured via an config XML file "ODI-logging-config.xml" under $ODI_HOME\oracledi\agent\bin\.

ODI logging system consists of several logger and log handlers. These are similar to the Java logging components. Here is a good introductions to Java logging components.By default we have two handlers one is console handler which logs data to console and one is file handler which logs the data to the file.
Console handler is for the defaulted to the startup messages. When ODI novices talk to logging they usually refer to console logging. In a typical installation agent is started as a background process and the console messages are routed to a out file(text file) and they call it a day. But little known thing is that ODI is capable of logging directly to the files and that we can control the level of logging also via the configuration file mentioned above. In this post we will talk mainly about the file handler.

Here are some important sections of the configuration file.

ODI-file-handler params:

level (log_handler parameter): File handler does not place any restriction on the level messages being logged. It will log what ever messages passed to it. That is why the level is set to "ALL".
path: This is the path to the log file. All the log messages are appended this log files.
maxFileSize: Interestingly, ODI handler does automatic log file size management. after the maxfilesize is reached it will move the file with a suffix and creates a new file and starts logging in the new file. This makes sure that the file size does not bloe out of control. If the log file with the name ODIagent.log size is greater the maxfilesize it will rename the file ODIagent.log to ODIagent-1.log and start writing logs to the new ODIagent.log file.

Loggers:

These are the components which send log messages to the handlers. Default setting on the root logger (oracle.odi) is NOTIFICATION:16 which is inherited by all the sub loggers (oracle.odi.XXXX). This root logger is configured to send all the messages to be logged to console handler and the file handler. Btw, if you notice even if the console handler and the root handler both get the same messages of level NOTIFICATION:16, console handler only logs the messages of level NOTIFICATION:1 and file handler logs all the messages.So, if we want to increase the log level/granularity, we can just change the log level on the root logger to any of the below parameters

Java Equivalent ODI 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


Leave a Reply

Subscribe to Posts | Subscribe to Comments

Popular Post

Labels

Blog Archive

Copyright © ODI Pundits - Oracle Data Integrator - Maintained by Arjun Lagisetty