从 Java EE 登录 SQL Server 的最佳方式是什么

发布于 2024-09-24 04:34:19 字数 109 浏览 1 评论 0原文

我有一个在 Weblogic 中运行的 Web 服务 Jax-RS。我需要记录对服务的调用。

从 java 应用程序登录到 SQL Server 的最佳方法是什么?

谢谢。

I have a web service Jax-RS running in Weblogic. I have a need to logg the calls made to the service.

What is the best way to log to SQL Server from a java application?

Thanks.

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

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

发布评论

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

评论(2

秉烛思 2024-10-01 04:34:19

既然您要求最好的方法,并且如果 Log4J 不是一个强烈的要求,我的建议是使用 Logback< /a> 及其 DbAppender。这是最好的方法:)

上次我检查时, JDBCAppender 仍然不能令人满意,如果您不能使用 logback,您可能更喜欢一些第三方实现。有关详细信息,请参阅以下链接:

Since you're asking for the best way, and if Log4J is not a strong requirement, my suggestion would be to use Logback and its DbAppender. That's the best way :)

Last time I checked, the JDBCAppender from Log4J was still not satisfying and if you can't use logback, you might prefer some third party implementation. See the links below for details:

离线来电— 2024-10-01 04:34:19

不久前以非常相似的方式提出了这个问题。
请参阅此处的原文: 使用 log4j 登录到数据库

接受的答案点通过 logback 到 DBAppender
http://logback.qos.ch/manual/appenders.html#DBAppender

This question was asked in a very simlilar fashion a little while ago.
See here for the original: Log to a database using log4j

The accepted answer points to the DBAppender by logback.
http://logback.qos.ch/manual/appenders.html#DBAppender

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