Title: SMTPAppender buffer size
Thanks for your idea.
But does it mean that the BufferSize parameter does not work ? Or maybe I don't understand its goal...
 
Simon BRANDHOF
-----Message d'origine-----
De : Jim Moore [mailto:[EMAIL PROTECTED]]
Envoyé : lundi 5 février 2001 23:33
À : 'LOG4J Users Mailing List'
Objet : RE: SMTPAppender buffer size

Hacking something out, it would be:
 
public TriggerAfter40LogEvents implements TriggeringEventEvaluator {
  private int count;
  public TriggerAfter40LogEvents() {
    count = 0;
  }
  public boolean isTriggeringEvent(LoggingEvent event) {
    if (count == 39) {
      count = 0;
      return true;
    }
    else {
      count++;
      return false;
    }
  }
}
 
Then use that as your trigger.  Obviously, the above isn't very maintainable, but you get the idea.

-Jim Moore

"Pinky, you've left the lens cap of your mind on again." - The Brain.

-----Original Message-----
From: BRANDHOF Simon [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 05, 2001 6:38 AM
To: '[EMAIL PROTECTED]'
Subject: SMTPAppender buffer size

Hi,

I hava problems using the 'BufferSize' option of the SMTPAppender.
Whatever its value, it always sends one mail by log.

Does anyone know how could I send a mail after only N logs ?

Thanks

Reply via email to