Its possible to get log4net up and running with 13 lines of XML code
and 1 line of C# (maybe less?):

<?xml version="1.0" encoding="utf-8" ?>
<log4net>
<appender name="FileAppender" type="log4net.Appender.FileAppender">
<file value="c:\\log.txt" />
<layout type="log4net.Layout.PatternLayout,log4net">
<conversionPattern value="%5p %d (%c:%L) - %m%n" />
</layout>
</appender>
<root>
<level value="ALL" />
<appender-ref ref="FileAppender" />             
</root>
</log4net>

log4net.Config.DOMConfigurator.ConfigureAndWatch(new
System.IO.FileInfo(AppDomain.CurrentDomain.SetupInformation.ApplicationBase
+ "log4net.config"));

I think that's prefectly reasonable. What part are you having problems
with? The problem most people have with log4net is with permissions. If
you aren't able to create a new file from your code then log4net isn't
going to be able to either.

All of us on the list would like to see a new version of log4net but
the version that is out now is pretty stable. All the issues with
log4net are basically requests for new features:

 http://issues.apache.org/jira/browse/LOG4NET

Most open source projects require at least some knowledge of CVS in
order to get the latest version. If you absoluetly lost with CVS and
Nant, I'm sure someone on the list would be able to send you an
assembly built from CVS.

I would really like to be able to download nightly builds of log4net
like some other projects (nant, nlog, Struts, etc.). I have no idea how
simple/hard that would be.

I keep meaning to take another look at nlog too. I tried using it once
but I could never get it setup correctly.

- Ron

--- David Anderson <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I have been following log4net-users for quite a while (and even had a
> couple of abortive efforts to get it working) and it strikes me that
> this is something which (at the moment) is only for the highly
> competent techies.
> 
> If you go to the Apache log4net site you are presented with very
> little information on how to get it working (in a simple format), and
> if you follow the link to download you get 1.2 beta 8 which is almost
> 2 years old. On installation the samples are useless (why for goodnes
> sake have Java examples??)
> 
> On joining the mailing list you find that unless you are fluent in
> CVS
> and Nant you can't get any later release.
> 
> NOT GOOD ENOUGH!!
> 
> Sorry for the rant - just frustrated after trying yet again after a
> layoff into PHP to get logging in .Net applications.
> 
> Perhaps time for a look at NLog again...
> 
> -- 
> Best regards,
>  David                          mailto:[EMAIL PROTECTED]
> 
> 
> 

Reply via email to