Just be aware that the documentation referred to in the URL is outdated,
and the flags in the configuration file are different.  Refer to docs in
the source that you pull from CVS.

-Michael 

-----Original Message-----
From: Rutledge, J. Mike [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 04, 2005 10:16 AM
To: Log4NET User
Subject: RE: need sample

Thanks for the reply. I'm trying to find documentation about what
parameters are available for the appenders, in particular, the file
appender,rollingfile appender, and smtpappender.

The docs at apache don't seem to list all of the parameters available.
Do you know where I could find them?

Thanks,
Mike

-----Original Message-----
From: Nicko Cadell [mailto:[EMAIL PROTECTED]
Sent: Friday, February 25, 2005 10:46 AM
To: Log4NET User
Subject: RE: need sample


To configure log4net you have several options, more details here:
http://logging.apache.org/log4net/release/manual/configuration.html

If you need to programmatically configure appenders have a look at:
http://marc.theaimsgroup.com/?l=log4net-user&m=110890793105314&w=2

To load config from a file use either:

1) Use an assembly attribute to load a config file:

[assembly: log4net.Config.DOMConfigurator]


2) Programmatically load a config file using the following code:

log4net.Config.DOMConfigurator.Configure(FileInfo)

Nicko


> -----Original Message-----
> From: Rutledge, J. Mike [mailto:[EMAIL PROTECTED]
> Sent: 25 February 2005 15:00
> To: [email protected]
> Subject: need sample
> 
> Can anyone point me to some sample c# code on how to set up the logger

> and fileappender?
> I've tried following the examples in the supplied documentation but I 
> don't understand it all.
> 
> For example,
> 
> ILog log =  LogManager.GetLogger(typeof(Form1));
> FileAppender fa = new FileAppender("c:\\znewlog.txt");
> 
> This fails because fileappender constructor is looking for another 
> parameter of type ILayout. I can't find any example of what Ilayout is

> or how to pass it in.
> 
> Also, If I decide to use a config file to do this, how do you link the

> logger to the config file (make it look there for it's settings)?
> 
> 
> Thanks,
> Rut 
> 
> ________________________________
> 
> CONFIDENTIALITY NOTE: This e-mail message, including any 
> attachment(s), contains information that may be confidential, 
> protected by the attorney-client or other legal privileges, 
> and/or proprietary non-public information. If you are not an 
> intended recipient of this message or an authorized assistant 
> to an intended recipient, please notify the sender by 
> replying to this message and then delete it from your system. 
> Use, dissemination, distribution, or reproduction of this 
> message and/or any of its attachments (if
> any) by unintended recipients is not authorized and may be unlawful. 
> 
> 

-----------------------------------------
CONFIDENTIALITY NOTE:  This e-mail message, including any
attachment(s),
contains information that may be confidential,  protected by the
attorney-
client or other legal privileges, and/or  proprietary non-public
information.  If you are not an intended  recipient of this message or
an
authorized assistant to an intended  recipient, please notify the sender
by
replying to this message and  then delete it from your system.  Use,
dissemination, distribution,  or reproduction of this message and/or any
of
its attachments (if  any) by unintended recipients is not authorized and
may be unlawful.


Reply via email to