Hello everyone,
I want to count all the logging events into our metrics system
(Prometheus). Our devs are using this to create alerts for Error/Fatal/Warn
events.

I gave up using filters because they catch all the events and not just the
ones that are actually written to the logger.

My current idea is to use a rewrite appender with my own rewrite policy
which will just increment the relevant counter and not modify the event.
The problem with this approach is again the filters, if an appender has a
filter defined then I will count  events that end up discarded.

Is there some post-logging hook I can use? An event maybe? Any help will be
much appreciated...
Thanks,
Guy Marom

Reply via email to