Loading

What Logs To Collect For API Policy Case

Publiceringsdatum: Jun 25, 2025
Uppgift

GOAL

When a Mule Runtime or an application loses sync with Anypoint API Manager, changes to online policies will not reflect and analytics will not be sent.
This article describes the Log4j loggers that should be enabled for troubleshooting communication issues between the API Manager client and the Anypoint platform.

Steg

For Standalone Mule Runtime
    
Enable the following loggers in MULE_HOME/conf/log4j2.xml:

1. Mule 3
<Loggers>
    ...
    <AsyncLogger name="com.mulesoft.module.client" level="TRACE" />
    <AsyncLogger name="com.mulesoft.module.policies" level="DEBUG" />
    <AsyncLogger name="com.mulesoft.analytics" level="DEBUG" />
    <AsyncLogger name="org.mule.module.http.internal.HttpMessageLogger" level="DEBUG" />
    <AsyncLogger name="com.ning.http" level="DEBUG" />
    ...
</Loggers>
2. Mule 4
<Loggers>
    ...
    <AsyncLogger name="com.mulesoft.mule.runtime.gw.analytics" level="TRACE"/>
    <AsyncLogger name="com.mulesoft.mule.runtime.gw" level="DEBUG" />
    <AsyncLogger name="com.mulesoft.extension.policies" level="DEBUG"/>
    <AsyncLogger name="com.mulesoft.mule.runtime.gw.client" level="TRACE"/>
    ...
</Loggers>

For Runtime Fabric
    Per the Runtime Fabric document Log Levels, you can use the Anypoint Runtime Manager to change the application log level by configuring the following property:
           1. Mule 3

logging.level.com.mulesoft.module.client=TRACE
logging.level.com.mulesoft.module.policies=DEBUG
logging.level.com.mulesoft.analytics=DEBUG
logging.level.org.mule.module.http.internal.HttpMessageLogger=DEBUG
logging.level.com.ning.http=DEBUG

           2. Mule 4

logging.level.com.mulesoft.mule.runtime.gw.analytics=TRACE
logging.level.com.mulesoft.mule.runtime.gw=DEBUG
logging.level.com.mulesoft.extension.policies=DEBUG
logging.level.com.mulesoft.mule.runtime.gw.client=TRACE


For a CloudHub application
    
You need to add the following configurations to the Settings page of the application in Runtime Manager -> Logging tab:

1. Mule 3
TRACE   com.mulesoft.module.client
TRACE   com.mulesoft.module.policies
TRACE   com.mulesoft.analytics
TRACE   org.mule.module.http.internal.HttpMessageLogger
TRACE   com.ning.http

           2. Mule 4

TRACE com.mulesoft.mule.runtime.gw.analytics 
TRACE com.mulesoft.mule.runtime.gw 
TRACE com.mulesoft.extension.policies


After configuring the logger levels, resulting logging will be found in the application log files.

Ytterligare resurser

To trace a request as it passes through the different policies applied to a Mule Application, refer to the following link:

How to enable trace logging for Mule Policies

Knowledge-artikelnummer

001114857

 
Laddar
Salesforce Help | Article