Re: Counting logging events

2016-12-11 Thread Guy Marom
Yes, that's my current plan. Again, thanks for the help On Dec 12, 2016 12:08 AM, "Matt Sicker" wrote: > Oh, I interpreted that backwards! Then the best layer to insert this logic > at might be as an appender wrapper of some sort like he mentioned already. > > On 11 December 2016 at 16:05, Remko

Re: Counting logging events

2016-12-11 Thread Matt Sicker
Oh, I interpreted that backwards! Then the best layer to insert this logic at might be as an appender wrapper of some sort like he mentioned already. On 11 December 2016 at 16:05, Remko Popma wrote: > Matt, > > I think Guy wants to count at the Appender level after all filtering is > done. > > S

Re: Counting logging events

2016-12-11 Thread Remko Popma
Matt, I think Guy wants to count at the Appender level after all filtering is done. Sent from my iPhone > On 12 Dec 2016, at 3:00, Matt Sicker wrote: > > Do you mean something similar to this? > https://docs.oracle.com/javase/8/docs/api/java/util/logging/LogRecord.html#getSequenceNumber-- >

Re: Counting logging events

2016-12-11 Thread Matt Sicker
Do you mean something similar to this? https://docs.oracle.com/javase/8/docs/api/java/util/logging/LogRecord.html#getSequenceNumber-- Although I think that has the same limitation as the number won't increase if the log message is filtered before being appended (or in the JUL vocabulary, the log r

Re: Counting logging events

2016-12-11 Thread Guy Marom
Hello again, Well, I think that both these options are not good for me. First I DO want to keep a separate track for each logger so the sequence number is no good. Second, using the a custom pattern or a lookup plugin both seem too intrusive to me. What if an appender already has a pattern or a l

Re: Counting logging events

2016-12-11 Thread Guy Marom
Thanks, I'll take a look at this suggestion! On Sun, Dec 11, 2016 at 1:56 PM, Remko Popma wrote: > One option is the SequenceNumber >

Re: Counting logging events

2016-12-11 Thread Remko Popma
One option is the SequenceNumber pattern converter %sn in PatternLayout

Counting logging events

2016-12-11 Thread Guy Marom
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 id