Dear Davide,

this is the right way to get over your problem, but you have to take care about 
the size of the bounded queue of the AsyncAppender. When the queue is full the 
Logger.append() method doesn't return immediately, and you have to wait for the 
oldest event to be served by the internal "dispatcher-thread".

Bye

--
Stefano

-----Messaggio originale-----
Da: DE BENEDICTIS DAVIDE [mailto:[EMAIL PROTECTED] 
Inviato: martedì 31 gennaio 2006 15.26
A: Log4J Users List
Oggetto: SMTPAppender drawback


SMTPAppender drawback or How to fool a "two billion dollar system"
misusing your tools...

Hi all,
I have a production system which uses extensively the Log4j framework.
This system notifies system users of errors and warnings by mail and sms
sent through an SMTPAppender. Few months ago we added a system startup
mail notification via another SMTPAppender...
This sytem lies behind various firewalls
Everything went smooth until suddendly, by mistake, a network ingineer
disabled the SMTP port on the firewall =:-0
Result: The system blocked for more than fifhteen minutes trying to
connecting to smtp server in vain...
All my previous tests were performed without firewall and if the mail
server did not accepted connections, the appender throwed an exception
releasing immediately.

Now I'm trying an AsyncAppender in front of the SMTPAppender.

Any thought?

Maybe in a future log4j manual would be better specify the pro and cons
of this useful but dangerous appender...

Bye

--
Davide

---------------------------------------------------------------------
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