Does any one have an idea how i can set authentication for my smtp server to
send mails.Iam attempting to send emails for every error generated in the
JBOSS and hence have set the respective log4j.xml entry as under.

   <!-- Buffer events and log them asynchronously-->
   <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
     <!--appender-ref ref="FILE"/-->
     <!--appender-ref ref="CONSOLE"/-->
     <appender-ref ref="SMTP"/>
   </appender>


   <!-- EMail events to an administrator-->
   <appender name="SMTP" class="org.apache.log4j.net.SMTPAppender">
     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
     <param name="Threshold" value="ERROR"/>
     <param name="To" value="[EMAIL PROTECTED]"/>
     <param name="From" value="[EMAIL PROTECTED]"/>
     <param name="Subject" value="JBoss Sever Errors"/>
     <param name="SMTPHost" value="smtp.vonbernuth.biz"/>
     <param name="BufferSize" value="10"/>
     <layout class="org.apache.log4j.PatternLayout">
       <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
     </layout>
   </appender>

However no emails are sent out.Any ideas suggestions would be greatly
appreciated.
  regards
Sandeep



----- Original Message -----
From: "Martin Olsson" <[EMAIL PROTECTED]>
To: "Log4J Users List" <[EMAIL PROTECTED]>
Sent: Monday, August 16, 2004 9:06 AM
Subject: Re: Flushing the log to file?


>
> Afaik no. I use a standard log4j setup which logs to file and console
> and I do not use any flushing. Maybe you could try it in a simple
> context like a "hello world" program.
>
> regards,
> Martin Olsson
>
> Schuhmacher, Bret wrote:
> > Is Log4J buffered?  I have the following statements:
> > myLog.fatal("a fatal log message here");
> > System.Exit(-2);
> >
> > The fatal message never gets written.  Do I need to flush the buffer to
> > disk somehow?  I couldn't find a method to do so (at least nothing like
> > "flush()").
> >
> > Thanks,
> >
> > Bret
> > --
> > Bret A. Schuhmacher                             voice:  423.837.7563
> > Sr. Architect, Aspect Professional Services     eMail:
> > [EMAIL PROTECTED]
> > Aspect Communications
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to