gpt4 book ai didi

java - JBoss JUL Sentry 集成

转载 作者:行者123 更新时间:2023-12-01 18:33:36 25 4
gpt4 key购买 nike

在 JBoss 中将 Sentry 与 JUL 集成时,我收到一条错误消息:

The configuration file in 'logging.properties' appears to be a J.U.L. configuration file. The log manager does not allow this type of configuration file. I followed the steps suggested in https://github.com/getsentry/raven-java/tree/master/raven

导致此问题的原因可能是什么?我的工作反射(reflect)在 https://github.com/gsvishnugs/wildfly-jul-raven

最佳答案

使用以下 jboss-cli 命令启动 Sentry 连接:

添加新模块

module add --name=com.getsentry.raven --resources=/path/to/jars/raven-7.6.0.jar,/path/to/jars/jackson-core-2.7.3.jar,/path/to/jars/slf4j-api-1.7.21.jar,/path/to/jars/slf4j-jdk14-1.7.9.jar --resource-delimiter=, --dependencies=javax.api    


添加自定义处理程序

/subsystem=logging/custom-handler=sentry:add(name=sentry,class=com.getsentry.raven.jul.SentryHandler,module=com.getsentry.raven,enabled=true,formatter=PATTERN,level=WARN,properties=[("dsn" => "https://pub_key:sec_key@app.getsentry.com/app_id")])

添加到根记录器

/subsystem=logging/root-logger=ROOT:add-handler(name=sentry)

建议下载上述新模块命令中提到的依赖jar。

关于java - JBoss JUL Sentry 集成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39211107/

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