从 Java EE 登录 SQL Server 的最佳方式是什么
我有一个在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
既然您要求最好的方法,并且如果 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:不久前以非常相似的方式提出了这个问题。
请参阅此处的原文: 使用 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