Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1022969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:32:40+00:00 2026-05-16T11:32:40+00:00

I have a JBOSS batch application that sometimes sends hundreds on emails in a

  • 0

I have a JBOSS batch application that sometimes sends hundreds on emails in a minute to the same email address with Log4J errors. This causes problems with Gmail, because it says we are sending emails too quickly for that gmail account.

So I was wondering if there was a way to basically create a “digest” or “aggregate” email puts all the error logs in 1 email and sends that every 5 minutes. So that way every 5 minutes we may get a large email, but at least we actually get the email instead of it being delayed for hours and hours by gmail servers rejecting it.

I read this post that suggested something about using an evaluator to do that, but I couldn’t see how that is configured in the Log4J xml configuration file. It also seemed like it might not be able to “digest” all the logs into 1 email anyway.

Has anyone done this before? Or know if it’s possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T11:32:41+00:00Added an answer on May 16, 2026 at 11:32 am

    From (the archived) SMTPAppender Usage page:

    set this property

    log4j.appender.myMail.evaluatorClass = com.mydomain.example.MyEvaluator
    

    Now you have to create the evaluator class and implement the org.apache.log4j.spi.TriggeringEventEvaluator interface and place this class in a path where log4j can access it.

    //Example TriggeringEventEvaluator impl
    
    package com.mydomain.example;
    
    import org.apache.log4j.spi.LoggingEvent;
    import org.apache.log4j.spi.TriggeringEventEvaluator;
    
    public class MyEvaluator implements TriggeringEventEvaluator {
    
        public boolean isTriggeringEvent(LoggingEvent event) { 
            return true; 
        }
    
    } 
    

    You have to write the evaluator logic within this method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using: Hibernate MySQL jBoss I have to create an application that allows user
I have JBoss AS 5. I'd like to see the default JSP that JBoss
I have a JBoss server (Server A) that is publishing messages on a topic.
I have a jboss web service that is getting the wrong initial context. I
I have an application running in JBoss AS6. Authentication is working using the FORM
I have a jboss and a tomcat installed in the same machine (with jboss
Right now I have a JBoss application server and I want to setup an
We have a cluster with 2 JBOSS nodes. We have a batch job which
We have jboss logging enabled in our application. Currently we are using the 'Rotating-file-handler'
I have jboss server running with fr_CH locale and application client running with de_CH

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.