gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-04 15:10:14 25 4
gpt4 key购买 nike

我是熔断源的新手,我正在尝试在 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/etcspring.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 获取日志文件。

最佳答案

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

关于java - 如何在 FuseBAI 中获取日志文件详细信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21422281/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com