|
One more thing to add....
The file log4netInternalDebugging.txt is not getting created now. Earlier the file was created with 0 kb in it.
-----Original Message-----
Oh wow! I LOVE the idea of setting up the trace via the config file. This is very neat! I can enable it whenever I want. But why is it so hard to get things working though? I implemented the code changes you mentioned and its still not working. My new code looks like this. public class myErrorHandler
public myErrorHandler
()
log4net.Config.XmlConfigurator.Configure(new
System.IO.FileInfo(strPath + "\\app.config"));
public void WriteToLog_Info(string sMessage)
public void WriteToLog_Err(string sErrorMessage)
logger.Error(System.Reflection.MethodBase.GetCurrentMethod()
+ ": Error - " + sErrorMessage); and my config file (app.config) looks like this.
<xml>
</listeners> -----Original Message----- You may need to call Flush after setting up the
listener or set the System.Diagnostics.Trace.Flush() Setting log4net.Internal.Debug to true in the
AppSettings as opposed to <configuration> Log4net can output the calling method for you: logger.Info("Exiting with Exception caught."); <layout
type="log4net.Layout.PatternLayout"> Here's a list of all the patterns in the current version of log4net: http://tinyurl.com/e3nd3
The log4net.Config.DOMConfigurator.Configure method
has been --- Ramaa Davanagere <[EMAIL PROTECTED]> wrote: > The code attached below is just not working. What
is wrong? All I'm |
Title: RE: Internal debugging
- Internal debugging Ramaa Davanagere
- Re: Internal debugging Farid LAOUFI
- Re: Internal debugging Ron Grabowski
- RE: Internal debugging Ramaa Davanagere
- RE: Internal debugging Ron Grabowski
- RE: Internal debugging Ramaa Davanagere
- RE: Internal debugging Ramaa Davanagere
- RE: Internal debugging Ron Grabowski
- RE: Internal debugging Ramaa Davanagere
- RE: Internal debugging Nicko Cadell
