Hi Greg,

Have a look at this post of mine:
http://blog.dataconversions.com.au/post/2011/04/06/Log4Net-Filter-Configuration.aspx
There is a zip file with sample app and few config options.
Check the Form1.cs file at the top, look for* [assembly:
log4net.Config.XmlConfigurator(Watch = true)]*
You could also initialise log4net in Program.cs or for web app in
Global.asax. Let me know if you need more help

Don't give up on log4net, there is huge amount of flexibility in there.

HTH
Filip



On 18 March 2012 19:34, Greg Keogh <[email protected]> wrote:

> Does anyone here use log4net? I used it several years ago but found it to
> be huge overkill because all I ever wanted to do was write everything to
> rolling files. I eventually wrote my own lightweight ‘RollingFile’ class
> and have used it for years. Now my logging needs have become a bit more
> complicated and I see that the latest log4net has expanded greatly to have
> all sorts of fancy appenders and filters. I quite like the idea that I can
> send severe error messages via email and boring stuff to a database (or
> lots of other interesting combinations like UDP and the event log).****
>
> ** **
>
> I’ve spent some spare time over the last few days trying to get the
> simplest example of writing to the TraceAppender or ConsoleAppender, but no
> matter what I do with config files and code I get no output. I have pasted
> lines out of dozens of examples and web searched until my eyes bleed
> without hope. Stepping deep inside tells me that the library “is not
> configured” and it does nothing.****
>
> ** **
>
> Could any kind person give me a minimal example of some code and a config
> file that writes “Hello” to a TraceAppender so it appears in the output
> window of VS2010? I am utterly stumped and at wits end.****
>
> ** **
>
> Thanks, Greg****
>

Reply via email to