logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thilo Schottelius <Thilo.Schottel...@impress.com>
Subject RE: Yet another SMTP appender question
Date Fri, 01 Jun 2001 15:26:14 GMT
Dear Michael,
you may have forgotten to call:

 smtpApp.activateOptions();
Thilo

-----Original Message-----
From: Michael Roytman [mailto:MRoytman@Novarra.com]
Sent: Donnerstag, 31. Mai 2001 21:50
To: LOG4J Users Mailing List
Subject: Yet another SMTP appender question


Hello,

can somebody please let me know what the problem is here?
I am trying to create a SMTP appender. The SMTPMin example from log4j core
works fine but when I try to create smtp appender programmatically
I get "log4j:ERROR Message object not configured." error.
Instead of configuring froma config file I simply do this:

      SMTPAppender smtpApp = new SMTPAppender();
      smtpApp.setOption("From", "mroytman@novarra.com");
      smtpApp.setOption("To", "mroytman@novarra.com");
      smtpApp.setOption("SMTPHost", "10.1.1.7");
      smtpApp.setOption("LocationInfo", "true");
      smtpApp.setOption("Subject", "Testing");
      smtpApp.setLayout(new PatternLayout());
      BasicConfigurator.configure(smtpApp);
---->>>>> smtpApp.activateOptions();
      cat.addAppender(smtpApp);

Am I missing something?
Thanks!

Michael

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

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


Mime
View raw message