Java 如何在FuseBAI中获取日志文件详细信息

Java 如何在FuseBAI中获取日志文件详细信息,java,Java,我是fuse源代码的新手,我正试图在url中的ReadMe.md文档的帮助下实现FuseBAI 我已经完成了他们在org.fusesource.bai.agent.cfg中提到的配置。我的配置文件是 # Fuse BAI configuration # ====================== # # This is only used if the bai feature is installed. # see: http://fuse.fusesource.org/eip/bai

我是fuse源代码的新手,我正试图在url中的ReadMe.md文档的帮助下实现FuseBAI

我已经完成了他们在org.fusesource.bai.agent.cfg中提到的配置。我的配置文件是

    # Fuse BAI configuration
# ======================
#
# This is only used if the bai feature is installed.
# see: http://fuse.fusesource.org/eip/bai.html
#
bai.xml = simpleconfig.xml
bai.xml = simpleconfig.xml
我的simpleconfig.xml是

<policySet xmlns="http://fuse.fusesource.org/schema/bai">
<policy id="nonAuditContexts" to="direct:testfusebai">
<contexts>
<exclude>
<context bundle="*" name="audit*"/>
</exclude>
</contexts>
<endpoints>
<include>
<endpoint>file:*</endpoint>
</include>
</endpoints>
<events>
<exclude>
<event eventType="FAILURE_HANDLED"/>
</exclude>
</events>   
</policy>
</policySet>

但根据policyset配置,它不会创建日志文件。如何使用FuseBAI获取日志文件。

我没有使用BAI,但让我试一试。看起来您试图将审核消息发送到direct:testfusebai,而不是文件。试着这样做:file:///tmp/testfusebai&Append=true

<camel:camelContext id="camel-A">
<camel:route>
<camel:from uri="direct:audit" />
<camel:to uri="file:/home/xyz/working_dir/order1" />
</camel:route>
</camel:camelContext>
 .fuse-047 | Instrumenting camel context camel-context.xml.277-camel-A with audit notifiers
2014-01-29 09:56:15,484 | INFO  | ExtenderThread-2 | DefaultAuditPolicy               | ?                                   ? | 275 - org.fusesource.bai.bai-core - 7.1.0.fuse-047 | Updating AuditEventNotifier Auditor(bundle: camel-context.xml camelContextId: camel-A) to policySet: PolicySet([Policy(nonAuditContexts, to: direct:testfusebai, Contexts(exclude[ContextFilter(*:audit*)]), Endpoints(include[EndpointFilter(file:*)]), Events(exclude[EventFilter(FAILURE_HANDLED)]))])
2014-01-29 09:56:15,485 | INFO  | ExtenderThread-2 | NotifierRegistration             | ?                                   ? | 275 - org.fusesource.bai.bai-core - 7.1.0.fuse-047 | Starting notifier Auditor(bundle: camel-context.xml camelContextId: camel-A)
2014-01-29 09:56:15,490 | INFO  | ExtenderThread-2 | OsgiBundleXmlApplicationContext  | ?                                   ? | 106 - org.springframework.context - 3.0.7.RELEASE | Not publishing application context OSGi service for bundle null (camel-context.xml)
2014-01-29 09:56:15,499 | INFO  | ExtenderThread-2 | ContextLoaderListener            | ?