You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Ly...@chase.com on 2001/10/16 15:06:41 UTC

Configuration question

Hi
I am just starting out with log4j, and I am currently looking at
configuring log4j using configuration files so that log output can be
controlled at runtime rather than being hard coded.
However, on looking at the Javadocs for log4j, it seems that a lot of the
static class fields have been deprecated in favour of using the JavaBeans
paradigm. Surely this means that most of the configuration therefore has to
be done programmatically rather than using a configuration file?
For example, with SMTPAppender, only a few static fields remain, meaning
that most of the configuration has to be done programmatically e.g.
SMTPAppender mail = new SMTPAppender();
mail.setFrom("fred@bloggs.com");
mail.setTo("Joe@bloggs.com");
mail.setSMTPHost("Notes.gateway");
mail.setSubject("Hello World");
mail.activateOptions();


Can anyone advise whether I am right in thinking this, or whether I have
got the wrong end of the stick.
Many thanks
Lyndsey


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: Configuration question

Posted by Ceki Gülcü <cg...@qos.ch>.
At 10:04 16.10.2001 -0400, you wrote:
>Look at the DOMConfigurator.
>
>It provides a lot of the extended control via an xml config file.
>
>It has a bug that prevents custom priorities, easy to fix and will
>be fixed in 1.2.

Ed,

Can you please describe this bug? Ceki

--
Ceki Gülcü - http://qos.ch
Link of the day: http://www.nytimes.com/2001/10/14/opinion/14SUN1.html


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Configuration question

Posted by Ed Soniat <ed...@texas.gtri.gatech.edu>.
Look at the DOMConfigurator.

It provides a lot of the extended control via an xml config file.

It has a bug that prevents custom priorities, easy to fix and will
be fixed in 1.2.

I might mention that if you can I would start with 1.2.  

No expert but I'll be glad to join you in learning.

Ed

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org