java如何在FuseBAI中获取日志文件详细信息
我是fuse source的新手,我正试图在自述文件的帮助下实现FuseBAI。md文档在urlhttps://github.com/fabric8io/fabric8/blob/master/bai/ReadMe.md中
我已经完成了他们在org中提到的配置。fusesource。白。代理人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>
两个文件的位置都是/opt/FuseESBEnterprise-7.1.0/etc 还有春天。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 | ?
但根据policyset配置,它不会创建日志文件。如何使用FuseBAI获取日志文件
# 1 楼答案
我没用过BAI,但让我试一试。看起来您试图将审核消息发送到
direct:testfusebai
,而不是发送到文件。试试这样:file:///tmp/testfusebai&Append=true