Configuring Open Integration Logging
Open Integration writes logs to the location specified in
log4j2.xml. Depending on your deployment, the logs directory can be a local
directory or a directory mounted from a remote location.
By default, Open Integration writes application logs to
logs/siebel-openint.log and dead-letter queue (DLQ) logs to
logs/siebel-openint-dlq.log. Open Integration also writes
application logs to the console.
You must set OI_CONSOLE_ONLY=true to write application and DLQ logs only
to the console. Open Integration does not create log files in this mode.
| Log Level | Description |
|---|---|
| ERROR | Records error messages only. |
| WARN | Records warning and error messages. |
| INFO | Records informational, warning, and error messages. |
| DEBUG | Records debug, informational, warning, and error messages. |
| TRACE | Records trace, debug, informational, warning, and error messages. |
| ALL | Records all log messages. |
The OI_LOG_LEVEL environment variable controls the application log
level. The DLQ_LOG_LEVEL environment variable separately controls the
DLQ log level. If either environment variable is not set, its log level defaults to
ERROR.
log4j2.xml:<Configuration status="WARN" name="Logging" monitorInterval="300">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} | %-5level | %X{operation} |
%X{channel}:%X{correlationId} | %X{sourceSystem}:%X{userAgent} |
%t | %logger{36} - %msg%n
</pattern>
</PatternLayout>
</Console>
<RollingFile
name="FileLogger"
fileName="logs/siebel-openint.log"
filePattern="logs/siebel-openint-%d{yyyy-MM-dd}-%i.log">
<PatternLayout>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} | %-5level | %X{operation} |
%X{channel}:%X{correlationId} | %X{sourceSystem}:%X{userAgent} |
%t | %logger{36} - %msg%n
</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="100 MB" />
</Policies>
<DefaultRolloverStrategy fileIndex="nomax" />
</RollingFile>
<RollingFile
name="DLQFileLogger"
fileName="logs/siebel-openint-dlq.log"
filePattern="logs/siebel-openint-dlq-%d{yyyy-MM-dd}-%i.log">
<PatternLayout>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} | %-5level | %X{operation} |
%X{channel}:%X{correlationId} | %X{sourceSystem}:%X{userAgent} |
%t | %logger{36} - %msg%n
</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="100 MB" />
</Policies>
<DefaultRolloverStrategy fileIndex="nomax" />
</RollingFile>
</Appenders>
<Loggers>
<Logger name="DLQLogger" level="${env:DLQ_LOG_LEVEL:-INFO}" additivity="false">
<AppenderRef ref="DLQFileLogger" />
</Logger>
<Root level="${env:OI_LOG_LEVEL:-INFO}" additivity="false">
<AppenderRef ref="FileLogger" />
<AppenderRef ref="Console" level="${env:OI_LOG_LEVEL:-INFO}" />
</Root>
</Loggers>
</Configuration>
Changing the Application Log Level
You can configure log levels by setting environment variables before you start Open
Integration. You can also set a fixed log level in log4j2.xml.
To set the application log level:
- Set the application log level by using the OI_LOG_LEVEL environment variable.
For example, you can set the application log level to DEBUG as
follows:
export OI_LOG_LEVEL=DEBUG - Set the DLQ log level independently by using the
DLQ_LOG_LEVELenvironment variable. For example, you can set the DLQ log level to INFO as follows:export DLQ_LOG_LEVEL=INFO - (Optional) Set
OI_CONSOLE_ONLYtotrueto write all logs to the console instead of log files. For example:export OI_CONSOLE_ONLY=trueAlternatively, set a fixed application log level in
log4j2.xml. For example:- Use the following configuration to set the application log level to
DEBUG:
<Root level="DEBUG" additivity="false"> <AppenderRef ref="FileLogger"/> <AppenderRef ref="Console" level="DEBUG"/> </Root> - Use the following configuration to set the application log level to INFO
and enable TRACE logging for specific packages or
classes:
<Loggers> <Root level="INFO" additivity="false"> <AppenderRef ref="FileLogger"/> <AppenderRef ref="Console" level="INFO"/> </Root> <Logger name="com.siebel.om.conmgr.Connection" level="TRACE"> <AppenderRef ref="Console"/> </Logger> <Logger name="com.siebel.uiinfra.sessmgr.UIConnectionModule" level="TRACE"> <AppenderRef ref="Console"/> </Logger> </Loggers>
If you change thelog4j2.xmlconfiguration after the server starts, edit the file at
. The server applies the change within five minutes.<install-location>/openint-deploy/target/log4j2.xmlNote: Set the log level to ERROR before you start the service. - Use the following configuration to set the application log level to
DEBUG: