我一直在研究一個API來測試我在工作中參與過的一個平臺,在從聖誕假期回來之後,我注意到它突然記錄了所有內容,我不知道爲什麼 - 如果任何人都可以提出這樣的理由,以及如何阻止它做到這一點,那將非常感激。下面的例子。WSO2ESB - API記錄所有內容
代碼:
<iterate expression="//tests">
<target>
<sequence>
<switch source="//tests/type">
<case regex="GW">
<log level="custom">
<property name="TYPE" value="GW"/>
</log>
<send>
<endpoint>
<http trace="disable" uri-template="http://localhost:8280/testsuite/node/gw"/>
</endpoint>
</send>
</case>
<case regex="ESB">
<log level="custom">
<property name="TYPE" value="ESB"/>
</log>
<send>
<endpoint>
<http trace="disable" uri-template="http://localhost:8280/testsuite/node/esb"/>
</endpoint>
</send>
</case>
<case regex="MB">
<log level="custom">
<property name="TYPE" value="MB"/>
</log>
<send>
<endpoint>
<http trace="disable" uri-template="http://localhost:8280/testsuite/node/mb"/>
</endpoint>
</send>
</case>
<default>
<log level="custom">
<property name="OOPS" value="NODE DOESN'T EXIST"/>
</log>
</default>
</switch>
</sequence>
</target>
</iterate>
日誌:
[2016-01-13 09:29:17,331] INFO - STRT = STARTING TESTSUITE IN SEQUENCE {org.apache.synapse.mediators.builtin.LogMediator} [2016-01-13 09:29:17,332] INFO - STRT = STARTING TESTSUITE IN SEQUENCE {API_LOGGER.JLRWSO2TestSuiteAPI} [2016-01-13 09:29:17,334] INFO - TYPE = ESB {org.apache.synapse.mediators.builtin.LogMediator} [2016-01-13 09:29:17,340] INFO - STRT = STARTING ESB IN SEQUENCE {org.apache.synapse.mediators.builtin.LogMediator} [2016-01-13 09:29:17,341] INFO - STRT = STARTING ESB IN SEQUENCE {API_LOGGER.testesb} [2016-01-13 09:29:17,345] INFO - STRT = STARTING TESTSUITE OUT SEQUENCE {org.apache.synapse.mediators.builtin.LogMediator} [2016-01-13 09:29:17,346] INFO - STRT = STARTING TESTSUITE OUT SEQUENCE {API_LOGGER.JLRWSO2TestSuiteAPI} [2016-01-13 09:29:17,346] INFO - To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:aafbecb4-c2fd-4d04-a64a-3e4bf1a63e50, Direction: response, Envelope: OK1 {org.apache.synapse.mediators.builtin.LogMediator} [2016-01-13 09:29:17,347] INFO - ENDO = ENDING TESTSUITE OUT SEQUENCE {org.apache.synapse.mediators.builtin.LogMediator} [2016-01-13 09:29:17,347] INFO - ENDO = ENDING TESTSUITE OUT SEQUENCE {API_LOGGER.JLRWSO2TestSuiteAPI}
從我可以告訴,用我有限的知識和API開發的經驗,日誌是從兩個未來不同的來源。我不知道如何阻止其中的一個,所以它只記錄一次,即使我知道如何停止,我也不知道該停止。
任何幫助將不勝感激。
它現在沒有記錄任何東西.. –