配置io.sentry和io.sentry.logback在wildfly 24中

发布于 2025-02-09 21:57:02 字数 1581 浏览 2 评论 0 原文

有什么方法可以为wildfly配置io.sentry和io.sentry.logback吗?因此,我的Javaee应用程序可以通过Wildfly登录到哨兵。

我尝试添加io.sentry和io.sentry.logback作为模块,但始终得到 引起的是:org.jboss.modules.modulenotfoundexception:io.sentry.logback

我添加了io.sentry-5.2.0.jar和io.sentry-logback-5.2.0.jar \ sentry \ main ... \ sentry-logback \带有module.xml的main文件夹,并尝试

<custom-handler name="SENTRY" module="io.sentry.logback" class="io.sentry.logback.SentryAppender">
                <level name="WARN"/>
                <formatter>
                    <pattern-formatter pattern="%d %-5p [%c] [%t] %s%E%n"/>
                </formatter>
                <properties>
                    <property name="dsn" value="https://[email protected]/38"/>
                </properties>
            </custom-handler>

在standalone.xml中

配置io.sentry和io.sentry.logback jar到模块/system/layers/layers/base/base/io/sentry (Sentry-Logback)/

with Main.xml。以下是XML的sentry.logback

<module name="io.sentry.logback" xmlns="urn:jboss:module:1.9">

  <properties>
    <property name="jboss.api" value="private"/>
  </properties>

  <resources>
    <resource-root path="sentry-logback-5.2.0.jar"/>
  </resources>

  <dependencies>
    <module name="io.sentry"/>
  </dependencies>
</module>

Is there any way to configure io.sentry and io.sentry.logback for wildfly? so my Javaee application can log to sentry through wildfly.

I tried to add io.sentry and io.sentry.logback as modules, but always get
Caused by: org.jboss.modules.ModuleNotFoundException: io.sentry.logback

I added io.sentry-5.2.0.jar and io.sentry-logback-5.2.0.jar to \modules\system\layers\base\io\sentry\main ...\sentry-logback\main folder with module.xml and tried to configure

<custom-handler name="SENTRY" module="io.sentry.logback" class="io.sentry.logback.SentryAppender">
                <level name="WARN"/>
                <formatter>
                    <pattern-formatter pattern="%d %-5p [%c] [%t] %s%E%n"/>
                </formatter>
                <properties>
                    <property name="dsn" value="https://[email protected]/38"/>
                </properties>
            </custom-handler>

in standalone.xml

also added io.sentry and io.sentry.logback jar to module/system/layers/base/io/sentry (sentry-logback)/main

with module.xml. following is xml for sentry.logback

<module name="io.sentry.logback" xmlns="urn:jboss:module:1.9">

  <properties>
    <property name="jboss.api" value="private"/>
  </properties>

  <resources>
    <resource-root path="sentry-logback-5.2.0.jar"/>
  </resources>

  <dependencies>
    <module name="io.sentry"/>
  </dependencies>
</module>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小…楫夜泊 2025-02-16 21:57:03

似乎Wildfly正在使用Log4J,因此我切换到Sentry-Jul集成,此后运行良好。

Sentry Github

Seems wildfly is using Log4j so I switched to sentry-jul integration, and it works well after that.

Some guide on sentry github

https://github.com/getsentry/sentry-java/discussions/2129#discussioncomment-3031199

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文