Enable Package Level Logging

You can enable DEBUG or TRACE logging for a specific package by adding a Logger element to log4j2.xml. This lets you collect diagnostic details while keeping the root application logger at INFO or ERROR.

The supplied configuration provides environment variables for the root application logger and DLQ logger only. Configure package-level logging directly in the XML.

A package logger applies to the named package and its subpackages. You must select the narrowest package that covers the issue. Start with DEBUG and use TRACE only when you need more detail.

Select a Logger Package

Use the applicable package name in the Logger element’s name attribute.

Area Logger Package
Integration execution, steps, transformations, workflows, and configuration com.siebel.openint.integrations
Integration step construction com.siebel.openint.integrations.steps
Integration workflow execution com.siebel.openint.integrations.workflow
Integration transformations, including JSONata com.siebel.openint.integrations.transformation
Transformation scripts com.siebel.openint.integrations.transformationscript
Integration configuration loading com.siebel.openint.integrations.config
External REST calls and their OpenID Connect (OIDC) security com.siebel.openint.integrations.rest
OIDC security for external REST calls com.siebel.openint.integrations.rest.security
Generated Open Integration REST endpoints com.siebel.openint.resource
UI sessions, requests, security, and connection infrastructure com.siebel.uiinfra
UI request processing com.siebel.uiinfra.request
UI connection management com.siebel.uiinfra.connmgr
UI session management com.siebel.uiinfra.sessmgr
UI security com.siebel.uiinfra.security
REST connection, metadata, context, and startup infrastructure com.siebel.restinfra
REST connection management com.siebel.restinfra.connmgr
REST metadata processing com.siebel.restinfra.metadata
Domain-specific language (DSL) flow execution com.siebel.openint.dsl
Siebel flow DSL execution com.siebel.openint.dsl.siebelflow
Proxy request handling and clients com.siebel.openint.proxy
Open Integration channels com.siebel.openint.channels
Open Integration handlers com.siebel.openint.handlers
Siebel data access com.siebel.data
Siebel integration utilities and outbound REST support com.siebel.integration
For example:
If the issue is with Add this logger at DEBUG first
An integration, mapping, step, retry, or workflow com.siebel.openint.integrations
An outbound call to another REST service com.siebel.openint.integrations.rest
A UI session, login, connection, or UI request com.siebel.uiinfra
REST connection setup or API metadata com.siebel.restinfra
A generated Open Integration API request com.siebel.openint.resource
A data-access operation com.siebel.data

Use TRACE only if DEBUG does not provide enough detail to diagnose the issue.

Prerequisites

Before you edit the installed configuration:

  • Save a copy of the current log4j2.xml file so that you can restore it.
  • Confirm whether the deployment uses file logging or OI_CONSOLE_ONLY=true.
  • Select the package to diagnose and define a short diagnostic period.
  • Identify every instance that can receive the affected request. Apply the configuration to those instances or route the test request to the configured instance.

Configure a Package Logger for File Logging

Use this procedure when OI_CONSOLE_ONLY is not set or is not true.

  1. Open <install-location>/openint-deploy/target/log4j2.xml.
  2. Locate DefaultArbiter under Loggers.
  3. Add the package logger immediately before the Root element. For example, add the following logger to enable integration diagnostics:
    <Logger name="com.siebel.openint.integrations"
            level="DEBUG"
            additivity="false">
        <AppenderRef ref="FileLogger"/>
        <AppenderRef ref="Console" level="DEBUG"/>
    </Logger>
    

    FileLogger writes the records to logs/siebel-openint.log. The Console reference also sends the selected diagnostic records to the console. Setting additivity="false" prevents the root logger from writing the same event again.

  4. Save the file and follow the steps in Apply and Remove Diagnostic Changes.
    You can keep the rest of the application at INFO by setting the following environment variable before starting Open Integration:
    export OI_LOG_LEVEL=INFO
  5. Restart Open Integration if you change this environment variable while the process is running.

    To collect TRACE records only for outbound REST calls, use this package logger instead:
    <Logger name="com.siebel.openint.integrations.rest"
            level="TRACE"
            additivity="false">
        <AppenderRef ref="FileLogger"/>
        <AppenderRef ref="Console" level="TRACE"/>
    </Logger>
    

Configure a Package Logger for Console-Only Logging

Use this procedure when OI_CONSOLE_ONLY=true.

  1. Open <install-location>/openint-deploy/target/log4j2.xml.
  2. Locate the EnvironmentArbiter branch with propertyName="OI_CONSOLE_ONLY" and propertyValue="true".
  3. Add the package logger immediately before the Root element. Use only the Console appender:
    <EnvironmentArbiter propertyName="OI_CONSOLE_ONLY" propertyValue="true">
        <Logger name="DLQLogger"
                level="${env:DLQ_LOG_LEVEL:-ERROR}"
                additivity="false">
            <AppenderRef ref="Console" level="${env:DLQ_LOG_LEVEL:-ERROR}"/>
        </Logger>
        <Logger name="com.siebel.openint.integrations"
                level="DEBUG"
                additivity="false">
            <AppenderRef ref="Console" level="DEBUG"/>
        </Logger>
    
        <Root level="${env:OI_LOG_LEVEL:-ERROR}" additivity="false">
            <AppenderRef ref="Console" level="${env:OI_LOG_LEVEL:-ERROR}"/>
        </Root>
    </EnvironmentArbiter>
    
  4. Save the file and follow the steps in Apply and Remove Diagnostic Changes.
Note: FileLogger does not exist in console-only mode. Do not reference it in the EnvironmentArbiter branch. If the deployment can use either logging mode, add the corresponding package logger to both branches with the appropriate appenders.

Configure Multiple Package Loggers

You can configure multiple package loggers. The most specific matching package controls an event.

For example, the following configuration enables DEBUG for integrations and TRACE for outbound REST calls:
<Logger name="com.siebel.openint.integrations"
        level="DEBUG"
        additivity="false">
    <AppenderRef ref="FileLogger"/>
    <AppenderRef ref="Console" level="DEBUG"/>
</Logger>

<Logger name="com.siebel.openint.integrations.rest"
        level="TRACE"
        additivity="false">
    <AppenderRef ref="FileLogger"/>
    <AppenderRef ref="Console" level="TRACE"/>
</Logger>

Use the appropriate appender configuration for every logger in the branch. Retain additivity="false" to prevent duplicate records. In file mode, include FileLogger and include Console when you also need console diagnostics. Set the console appender-reference threshold to allow the selected log level.