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("[EMAIL PROTECTED]");
mail.setTo("[EMAIL PROTECTED]");
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to