logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gaurav <gaurav9...@gmail.com>
Subject Re: Invoke custom code after RollingFileAppender append()
Date Mon, 18 Feb 2019 07:11:15 GMT


On 2019/02/15 15:58:07, Ralph Goers <ralph.goers@dslextreme.com> wrote: 
> That isn’t what was asked for.  He asked to send an email after the appender appends
an event.
> 
> Ralph
> 
> > On Feb 15, 2019, at 8:54 AM, Remko Popma <remko.popma@gmail.com> wrote:
> > 
> > Ralph,
> > 
> > I guess then the question becomes: how can the filter detect that a particular event
triggered a rollover?
> > 
> > Remko.
> > 
> > (Shameless plug) Every java main() method deserves http://picocli.info
> > 
> >> On Feb 15, 2019, at 23:39, Ralph Goers <ralph.goers@dslextreme.com> wrote:
> >> 
> >> I don’t think I understand this requirement. Why couldn’t they just create
a filter that sends the email. Sure, it won’t be right after the event is logged but so
what?
> >> 
> >> Ralph
> >> 
> >>> On Feb 15, 2019, at 7:15 AM, Gary Gregory <garydgregory@gmail.com>
wrote:
> >>> 
> >>> Maybe we should introduce the ability to inject a custom class pre and post
> >>> even processing? We could provide an implementation based on the scripting
> >>> API so folks could just write JavaScript directly in the config.
> >>> 
> >>> Gary
> >>> 
> >>>> On Fri, Feb 15, 2019 at 7:34 AM gaurav <gaurav9822@gmail.com>
wrote:
> >>>> 
> >>>> Hi log4jusers,
> >>>> 
> >>>> Want to invoke custom code(to send email) after the RollingFileAppender
> >>>> append event.
> >>>> 
> >>>> What would you suggest?
> >>>> 
> >>>> P.S. Cannot extend RollingFileAppender, as it is final.
> >>>> 
> >>>> Please help
> >>>> 
> >>>> Thank you,
> >>>> Gaurav
> >>>> 
> >> 
> >> 
> >> 
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> >> For additional commands, e-mail: log4j-user-help@logging.apache.org
> >> 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > 
> > 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> Hi Ralph,
Correct. I want the Appender to append an event and then send an email with my custom code.


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


Mime
View raw message