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

时间:2014-01-29 04:42:27

标签: java

我是新手来融合源代码,我正在尝试使用url https://github.com/fabric8io/fabric8/blob/master/bai/ReadMe.md中的ReadMe.md文档来实现FuseBAI。

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

    # 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>

两个文件位置都是/opt/FuseESBEnterprise-7.1.0/etc 和spring.xml是

<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            | ?  

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

1 个答案:

答案 0 :(得分:0)

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

相关问题