Paul, 

> Thanks for the info. I could successfully trace to a text 
> file now. But, I needed to set the following configuration.
>       <system.diagnostics>
>               <switches>
>                       <add name="MagicTraceSwitch" value="3" />
>               </switches>
>         <trace autoflush="false" indentsize="4" />
>                       <assert assertuienabled="true" 
> logfilename="C:\mytrace.txt"/>
>       </system.diagnostics>
> in the config file. Am I correct?

That should setup the .net System.Diagnostics.Trace system to write to a
file.

 
> Further, I want to implement the "ColoredConsoleAppender" 
> also. By default, the output is directed to the output 
> window, where we cannot see any color impacts. Any solution for this?

If by "output window" you mean the Visual Studio Debugger Output Window then
no.
The Windows Console supports coloured output. The ColoredConsoleAppender
uses the Console to display the messages in colour. To have a console
attached to your program you will need to compile your application as a
Console Application. Also I can't remember if this is supposed to work on
Win9x (I think it is), it does work on WinNT/2k/XP/2k3.

Cheers,

Nicko


> 
> Thanks & Regards
> Paul
> 
> -----Original Message-----
> From: Nicko Cadell [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 19, 2004 9:54 PM
> To: 'Log4NET User'
> Subject: RE: eg. for using TraceAppender
> 
> 
> Paul,
> 
> An example of how to configure the TraceAppender can be found here:
> http://logging.apache.org/log4net/release/config-examples.html
> #HC-15855697
> 
> The appender is used just like any other. See the ConsoleApp 
> example in the download 
> (examples\net\1.0\Tutorials\ConsoleApp) for details on how to 
> use log4net.
> 
> Cheers,
> 
> Nicko
> 
> > -----Original Message-----
> > From: Paul Rayer [mailto:[EMAIL PROTECTED]
> > Sent: 19 April 2004 14:49
> > To: 'Log4NET User'
> > Subject: RE:eg. for using TraceAppender
> >
> > Any sample code to implement TraceAppender in the 
> application? How to 
> > use the System.Diagnostics.TraceListener in the application?
> >
> > Paul
> 

Reply via email to