开发者

What is the best way to log to SQL Server from Java EE

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 t开发者_如何学运维o SQL Server from a java application?

Thanks.


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:

  • http://www.boky.cc/2010/02/03/jdbcappender-for-log4j/
  • http://www.dankomannhaupt.de/projects/ (older)


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜