3

我知道如何让 Apache Camel (2.10.3) 使用 Log 组件记录流的主体(soap 消息)。但是,我想使用 Tracer 而不是 Log。

文档说要启用LOG_DEBUG_BODY_STREAMS属性,我这样做了,但这似乎没有什么区别:

    <bean id="camelTracer" class="org.apache.camel.processor.interceptor.Tracer">
    <property name="traceOutExchanges" value="true"/>
    <property name="traceExceptions" value="true"/>
    <property name="logStackTrace" value="true"/>
    <property name="traceInterceptors" value="true"/>
    <property name="logLevel" value="TRACE"/>
    <property name="logName" value="xxx.cameltracer"/>
</bean>     

<bean id="traceFormatter" class="org.apache.camel.processor.interceptor.DefaultTraceFormatter">
    <property name="showBody" value="true"/>
    <property name="showOutBody" value="true"/>
    <property name="showBodyType" value="false"/>
    <property name="showBreadCrumb" value="true"/>
    <property name="showHeaders" value="false"/>
</bean> 

<camelContext id="camelContext" xmlns="http://camel.apache.org/schema/spring" streamCache="true" trace="true">
    <properties>
       <property key="CamelLogDebugBodyStreams" value="true"/>
    </properties>
    ...

还有什么我需要配置的吗?

4

1 回答 1

3

您的财产中有一个类型-o,它应该是:

<camelContext id="camelContext" xmlns="http://camel.apache.org/schema/spring" streamCache="true" trace="true">
    <properties>
       <property key="CamelLogDebugStreams" value="true"/>
    </properties>
于 2013-02-01T11:34:30.073 回答