Reputation: 330
I want to get all transport headers in a sequence. I can get specific headers that I know the their names, but I want to get all of them including the ones that I do not know header names.
I find this question same, but there is no solution for our problem. WSO2 ESB print all TRANSPORT_HEADERS
I tried also logging this
<property name="TRANSPORT_HEADERS" action="set" scope="axis2"/>
but I got nothing in WSO2 logs.
WSO2 version 6.4.0
Thanks for any idea!
Upvotes: 1
Views: 2274
Reputation: 11
I have enabled wire logs in log4j.properties and restarted the server and It works fine for me. I am using esb 4.9 version.
log4j.logger.org.apache.synapse.transport.http.headers=DEBUG
log4j.logger.org.apache.synapse.transport.http.wire=DEBUG
Upvotes: 1
Reputation: 314
We can't log this property using property mediator since this is an internal JAVA Map in axis2-transports. Hence We may need to use a class mediator for this purpose.
Following is a sample one.
You may place the class mediator jar directly in EI_HOME/lib or ESB_HOME/repository/components/lib and use the following config
<class name="org.sample.LogTransportHeaders"/>
in the proxy or API after adding following to log4j.properties file
log4j.logger.org.sample.LogTransportHeaders=INFO
Please refer here for further details : https://medium.com/@nirothipanram/wso2-ei-print-all-transport-headers-12aabb4027cc
Upvotes: 1
Reputation: 653
I don't know how to use the 'Transport headers' property exactly, but based on your problem description I think you can also solve your problem as follows: You can log all headers by setting the log level in the carbon console configure->logging->org.apache.synapse.transport.http.headers to 'DEBUG'.
Upvotes: 0