Hi. Im trying to enable the internal.debugging like this: Do not work. But the connection to the database I have already done and have found the problem :). But this internaldebugger writes nothing to the file when I cause the error :(
<appSettings> <add key="log4net.Internal.Debug" value="true"/> </appSettings> <system.diagnostics> <trace autoflush="true"> <listeners> <add name="textWriterTraceListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="d:\bugLogs.txt" /> </listeners> </trace> </system.diagnostics> SEGERS Steven (CNH) wrote: > > Hello Costan > > I think it's best to enable internal debugging. That should give you more > information. > > http://logging.apache.org/log4net/release/faq.html#internalDebug > > Best Regards > > Steven > -----Original Message----- > From: costan [mailto:spick...@yahoo.de] > Sent: dinsdag 8 november 2011 8:55 > To: log4net-user@logging.apache.org > Subject: Log4Net and MySQL with C# .NET Framework 4.0 > > > Hello everyome Im trying to post some errors to my MySQL-Database, but it > happens nothing. Im trying it since 5 Days now and cant find a solution. > At the first I downloaded the MySQL-Connector and added the MySQL.Data.dll > to the reference of the Project. > > Then I created my own Configfile it looks like this one: > > <?xml version="1.0"?> > <configuration> > <configSections> > <section name="log4net" > type="log4net.Config.Log4NetConfigurationSectionHandler,Log4net"/> > </configSections> > <log4net> > <root> > <!-- OFF, FATAL, ERROR, WARN, DEBUG, INFO, ALL --> > <level value="ALL"/> > <appender-ref ref="FileAppender"/> > <appender-ref ref="ADONetAppender"/> > </root> > <appender name="FileAppender" > type="log4net.Appender.RollingFileAppender" > > > > <rollingStyle value="Size" /> > <maxSizeRollBackups value="10" /> > <maximumFileSize value="10MB" /> > <staticLogFileName value="true" /> > <layout type="log4net.Layout.PatternLayout"> > > </layout> > </appender> > > <appender name="ADONetAppender" > type="log4net.Appender.AdoNetAppender"> > <bufferSize value="1" /> > <connectionType value="MySql.Data.MySqlClient.MySqlConnection, > MySql.Data, Version=6.4.4.0, Culture=neutral, > PublicKeyToken=c5687fc88969c44d" /> > <connectionString value="Server=MyIP; > Database=themenportale_log4net;Uid=log4netuser;Pwd=12345" /> > <commandText value="INSERT INTO 'Log' (Message) VALUES (?message)" > /> > <parameter> > <parameterName value="?message" /> > <dbType value="String" /> > <size value="4000" /> > <layout type="log4net.Layout.PatternLayout"> > <conversionPattern value="%message" /> > </layout> > </parameter> > </appender> > </log4net> > </configuration> > > The Fileappender wirks very well, but the MySQL-Appender do nothing. I > tryed to do this Tutorial but It couldn't help me: > http://rafayal.blogspot.com/2009/05/using-log4net-with-c-and-mysql.html > It doesn't work too. > > I think my problem is the Configfile and I have somewhere a mistake. > -- > View this message in context: > http://old.nabble.com/Log4Net-and-MySQL-with-C--.NET-Framework-4.0-tp32801621p32801621.html > Sent from the Log4net - Users mailing list archive at Nabble.com. > > > -- View this message in context: http://old.nabble.com/Log4Net-and-MySQL-with-C--.NET-Framework-4.0-tp32801621p32809097.html Sent from the Log4net - Users mailing list archive at Nabble.com.