Open Integration Logging Overview
You can configure where Open Integration writes logs and how much detail it records
by updating log4j2.xml or setting the logging environment
variables.
The logs directory can be local or mounted from a remote location. By
default, Open Integration writes:
- Application logs to
logs/siebel-openint.logand the console. - Dead-letter queue (DLQ) logs to
logs/siebel-openint-dlq.log.
To write both application and DLQ logs only to the console, you must set
OI_CONSOLE_ONLY=true. Open Integration does not create log files in
this mode.
The following levelsare supported:
| Log Level | Description |
|---|---|
| ERROR | Records error messages only. This is the default. |
| WARN | Recordswarning and error messages. |
| INFO | Recordsinformational, warning, and error messages. |
| DEBUG | Recordsdebug, informational, warning, and error messages. |
| TRACE | Recordstrace, debug, informational, warning, and error messages. |
| ALL | Recordsall log messages. |
OI_LOG_LEVEL environment variable controls application logging. The
DLQ_LOG_LEVEL environment variable controls DLQ logging
independently. Each log level defaults to ERROR when its environment
variable is not set. For
example:export OI_LOG_LEVEL=INFO
export DLQ_LOG_LEVEL=INFO
export OI_CONSOLE_ONLY=true
You must restart Open Integration after you add or change OI_LOG_LEVEL,
DLQ_LOG_LEVEL, or OI_CONSOLE_ONLY so that the
process reads the updated values. However, you can update log4j2.xml
without restarting Open Integration. For more information, see Fixed Log Levels and
Reload.
Routing Log Output
You can control where Open Integration writes application and DLQ logs by setting
OI_CONSOLE_ONLY.
| Setting | Application Logs | DLQ Logs |
|---|---|---|
OI_CONSOLE_ONLY is unset or is not true |
Written to logs/siebel-openint.log and the
console, subject to the configured console threshold. |
Written to logs/siebel-openint-dlq.log. |
OI_CONSOLE_ONLY=true |
Written only to the console. | Written only to the console. |
Application logging and DLQ logging operate independently. Set
OI_LOG_LEVEL to control application logging and
DLQ_LOG_LEVEL to control DLQ logging. Changing either variable
does not affect the other.
For package-specific logging, the logger level determines which events the logger
accepts. Its AppenderRef elements determine where those events are
written. To display DEBUG or TRACE events in the console, set both the package
logger level and its console appender-reference level accordingly. Adding only a
package level can result in events being accepted by the logger but filtered before
they reach the console.
Adding a package logger does not create a separate log file. When file logging is
enabled, package events use FileLogger and appear in
logs/siebel-openint.log with other application events.
Correlating Log Records for a Request
You can use the request context in each log record to trace a request across Open Integration components.
| Pattern Field | Description |
|---|---|
%X{operation} |
The operation being performed. |
%X{channel} |
The channel through which the request was received or processed. |
%X{correlationId} |
The identifier that links records for the same request or flow. |
%X{sourceSystem} |
The calling or source system, when available. |
%X{userAgent} |
The client user-agent information, when available. |
%t |
The thread that generated the record. |
%logger{36} |
The logger name, abbreviated to fit within 36 characters. |
To investigate a request, search for its correlationId. Then use
operation and channel to follow the request
across packages.