logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Skeet" <jon.sk...@peramon.com>
Subject RE: SMTP Host and SMTP appender
Date Wed, 05 Sep 2001 12:43:55 GMT
> However, I am not able to do this. Even though I set the smtp host in
> the property before creating a session using JavaMail. My code still
> uses the smtp host set in the log4j smtp appender. 

Despite my previous comment (ie log4j really *is* broken, and I'll be
patching it) I suspect your code is flawed as well - how are you setting
the smtp host in *your* code?

Rather than

Properties props = System.getProperties();
props.setProperty (...);

you should use

Properties props = new Properties (System.getProperties());
props.setProperty (...);

that way your code will work even while Log4J is still broken.


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

View raw message