Hi,
http://www.codeproject.com/Articles/140911/log4net-Tutorial (hit #2 for
"log4net tutorial", at least for me) yields:
[assembly: log4net.Config.XmlConfigurator(Watch = true)]

At work we use log4net and have never had any issues. One thing it's very
useful for is sending email messages when logging an error (SMTPAppender).

Regards,
Tristan

On Mon, Mar 19, 2012 at 10:04 AM, Greg Keogh <g...@mira.net> wrote:

> Thanks everyone for detailed replies on this, which led to find the
> magical missing link to get log4net working. You need one of these:****
>
> ** **
>
> log4net.Config.XmlConfigurator.Configure();****
>
> -or-****
>
> [assembly: log4net.Config.XmlConfigurator(ConfigFile =
> "testapp.exe.config", Watch = true)]****
>
> ** **
>
> The parameterless Configure() method is easier and tells it to use a
> section of the default config file, which is fine for me.****
>
> ** **
>
> Most of the documentation on log4net I’ve found so far concentrates on how
> the appenders work and how to write their config elements. Not even the
> log4net samples have the lines I’ve listed above. I couldn’t find a single
> simple example that worked.****
>
> ** **
>
> Now how do I chose between log4net and NLog?****
>
> ** **
>
> Thanks****
>
> Greg****
>
> ** **
>

Reply via email to