Reputation: 371
I'm using WSO2 API Manager 2.1.0. Is it possible to maintain a separate log file for a specific API as required?
Thanks in advance.
Upvotes: 0
Views: 82
Reputation: 14594
Other than creating a custom log handler. You can also consider creating a separate service logger for that API as mentioned here.
Upvotes: 1
Reputation: 47
How about using the APILogMessageHandler? I don't know whether you can create a separate log file from it, but you can add api specific logs. You just need to add following handler to the synapse api file generated in <APIM_HOME>/repository/deployment/server/synapse-configs/default/api
directory.
<handler class="org.wso2.carbon.apimgt.gateway.handlers.logging.APILogMessageHandler"/>
More information can be found in here. https://docs.wso2.com/display/AM210/Writing+Custom+Handlers
Upvotes: 1