问题描述
< pre lang ="xml">我正在使用log4cxx在我的应用程序中记录目的.我已经配置了xml.我现在可以登录控制台和文本文件,我想登录到MS Access数据库.我有MySql的Appender,它是
< appender name ="MyOdbcMysqlAppender" class ="org.apache.log4j.odbc.ODBCAppender">
< param name ="URL" value ="Driver = {MySQL ODBC 5.1 Driver}; Server = localhost; Database = errorlog; User = logger; Password = abc123; Option = 3;" />
-< layout class ="org.apache.log4j.PatternLayout">
< param name ="ConversionPattern" value =在错误日志(errormessage)中插入值('%d-%c-%p-%m')"/>
</layout>
</appender>
但是我想为此使用MS Access,我应该指定哪个驱动程序以及如何在此类Appender中使用DSN ...我陷入了困境.请帮助...在此先感谢</pre>
<pre lang="xml">I am using log4cxx for logging purpuse in my application.i have configured xml. i ma able to log on the console and text file now i want to log into MS Access database. I got the Appender for MySql which is
<appender name="MyOdbcMysqlAppender" class="org.apache.log4j.odbc.ODBCAppender">
<param name="URL" value="Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=errorlog;User=logger;Password=abc123;Option=3;" />
- <layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="INSERT INTO errorlog (errormessage) VALUES ('%d - %c - %p - %m')" />
</layout>
</appender>
but i want to use MS Access for that i which driver i should specify and how can i use DSN in such appender...i got stuck in this.Please help...Thanks in advance</pre>
推荐答案
这篇关于女士访问权限配置与xml中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!