简体   繁体   English

如何为log4jdbc配置log4j2.xml?

[英]How to configure log4j2.xml for log4jdbc?

Does anyone know how to configure the log4j2.xml file to use log4jdbc? 有谁知道如何配置log4j2.xml文件以使用log4jdbc? I have been searching for several hours and I can't seem to find anything. 我已经搜索了几个小时,但似乎找不到任何东西。

log4jdbc relies on SLF4J . log4jdbc依赖于SLF4J There is to date no proper connector between SLF4J and Log4j 2. 迄今为止,SLF4J和Log4j 2之间没有正确的连接器。

If you want, you can instead use log4jdbc-log4j2 , which addresses exactly this need of getting log4j2 to work with log4jdbc. 如果需要,可以改用log4jdbc-log4j2 ,它完全满足了使log4j2与log4jdbc一起使用的需求。

As of beta5, Log4j 2.0 does not offer a JDBC Appender. 从beta5版本开始,Log4j 2.0不提供JDBC Appender。 However, the team is working on one and it is likely that a subsequent release will contain one. 但是,该团队正在研究一个,随后的发行版可能包含一个。

Which also means: if you have any feature requests, ideas or comments, now would be a good time to let the team know! 这也意味着:如果您有任何功能要求,想法或意见,那么现在是让团队知道的好时机!

The dev mailing list, user mailing list or Jira issue tracker are all fine places to get your voice heard. 开发邮件列表,用户邮件列表或Jira问题跟踪器都是使您的声音被听到的好地方。


Update: As of beta 7, Log4j2 offers JDBC, JPA, and NoSQL database appenders. 更新:从beta 7开始,Log4j2提供JDBC,JPA和NoSQL数据库附加程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM