logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Goldsmith" <JGoldsm...@psmic.com>
Subject RE: Cannot switch between logging levels
Date Mon, 22 Aug 2005 17:24:53 GMT
Ok...I'm still having problems with switching between logging level
using the ADONetAppender.  I have implemented the Internal Debugging and
whenever I switch I receive the following message:

log4net:ERROR [ADONetAppender] Could not open database connection []
System.InvalidOperationException: The ConnectionString property has not
been initialized.
   at System.Data.SqlClient.SqlConnection.Open()
   at log4net.Appender.ADONetAppender.InitializeDatabaseConnection()
log4net: DOMConfigurator: Created Appender [AdoNetAppender]


Any Ideas?

 
Jason Goldsmith
Solution Stream
1510 N.Elms Road
Flint MI, 48532
Phone: 810.600.3913
 
-----Original Message-----
From: Ron Grabowski [mailto:rongrabowski@yahoo.com] 
Sent: Wednesday, August 17, 2005 9:03 AM
To: Log4NET User
Subject: RE: Cannot switch between logging levels

>From the faq.html page:

"
Internal debugging messages are written to the console and to the
System.Diagnostics.Trace system.
"

A simple way to redirect messages sent to System.Diagnostics.Trace is
to define a trace listener in the web.config:

<system.diagnostics>
 <trace autoflush="true">
  <listeners>
   <add name="textWriterTraceListener" 
    type="System.Diagnostics.TextWriterTraceListener" 
    initializeData="C:\\inetpub\\wwwroot\\log4net.txt" />
  </listeners>
 </trace>
</system.diagnostics>

I agree that if switching log levels works correctly for one appender,
it should work for the other appenders as well.

--- Jason Goldsmith <JGoldsmith@psmic.com> wrote:

> Ok, I've attempted to enable internal debugging to no avail.  I just
> don't understand Why switching from one log level to another works
> when
> I have root as FileAppender, but doesn't work when root is set to
> ADONetAppender.  Any thoughts?  
> 
> If any of my code is necessary, please let me know.  I have, however,
> provided snippets (in my first email to the group) of my web.config,
> log4net.config, global.asax.cs, AssemblyInfo.cs.
> 
> Thanks again,
> 
>  
> Jason Goldsmith
> Solution Stream
> 1510 N.Elms Road
> Flint MI, 48532
> Phone: 810.600.3913

Mime
View raw message