You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Ian Boston <ie...@tfd.co.uk> on 2017/03/23 11:03:17 UTC

Logging config to combat "log spamming"

Hi,
Is there are way of configuring the logging service so that it doesn't
repeatedly spam the logs with the same message or extremely high volume
messages. This may seem like an odd request, but when a Sling instance
running an application goes haywire spitting out massive exception stack
traces. it can consume all available IO and also all available disk space
quite quickly before anyone can get to it.

Perhaps there is a logback feature already to deal with this ?
Best Regards
Ian

Re: Logging config to combat "log spamming"

Posted by Ian Boston <ie...@tfd.co.uk>.
Thank you all.
Looks like that might do the job provided the log messages are
parameterised.
Best Regards
Ian

On 23 March 2017 at 11:23, Chetan Mehrotra <ch...@gmail.com>
wrote:

> As Robert said you can use the DuplicateMessageFilter. For now you
> would need to configure it in a logback.xml and use that in Sling [1].
>
> Chetan Mehrotra
> [1] https://sling.apache.org/documentation/development/
> logging.html#external-config-file
>
>
> On Thu, Mar 23, 2017 at 4:43 PM, Robert Munteanu <ro...@apache.org>
> wrote:
> > Hi,
> >
> > On Thu, 2017-03-23 at 11:03 +0000, Ian Boston wrote:
> >> Hi,
> >> Is there are way of configuring the logging service so that it
> >> doesn't
> >> repeatedly spam the logs with the same message or extremely high
> >> volume
> >> messages. This may seem like an odd request, but when a Sling
> >> instance
> >> running an application goes haywire spitting out massive exception
> >> stack
> >> traces. it can consume all available IO and also all available disk
> >> space
> >> quite quickly before anyone can get to it.
> >>
> >> Perhaps there is a logback feature already to deal with this ?
> >
> > Logback has the concept of filters
> >
> >   https://logback.qos.ch/manual/filters.html
> >
> > but I am not sure how to link these to Sling's config.
> >
> > Robert
>

Re: Logging config to combat "log spamming"

Posted by Chetan Mehrotra <ch...@gmail.com>.
As Robert said you can use the DuplicateMessageFilter. For now you
would need to configure it in a logback.xml and use that in Sling [1].

Chetan Mehrotra
[1] https://sling.apache.org/documentation/development/logging.html#external-config-file


On Thu, Mar 23, 2017 at 4:43 PM, Robert Munteanu <ro...@apache.org> wrote:
> Hi,
>
> On Thu, 2017-03-23 at 11:03 +0000, Ian Boston wrote:
>> Hi,
>> Is there are way of configuring the logging service so that it
>> doesn't
>> repeatedly spam the logs with the same message or extremely high
>> volume
>> messages. This may seem like an odd request, but when a Sling
>> instance
>> running an application goes haywire spitting out massive exception
>> stack
>> traces. it can consume all available IO and also all available disk
>> space
>> quite quickly before anyone can get to it.
>>
>> Perhaps there is a logback feature already to deal with this ?
>
> Logback has the concept of filters
>
>   https://logback.qos.ch/manual/filters.html
>
> but I am not sure how to link these to Sling's config.
>
> Robert

Re: Logging config to combat "log spamming"

Posted by Robert Munteanu <ro...@apache.org>.
Hi,

On Thu, 2017-03-23 at 11:03 +0000, Ian Boston wrote:
> Hi,
> Is there are way of configuring the logging service so that it
> doesn't
> repeatedly spam the logs with the same message or extremely high
> volume
> messages. This may seem like an odd request, but when a Sling
> instance
> running an application goes haywire spitting out massive exception
> stack
> traces. it can consume all available IO and also all available disk
> space
> quite quickly before anyone can get to it.
> 
> Perhaps there is a logback feature already to deal with this ?

Logback has the concept of filters

  https://logback.qos.ch/manual/filters.html

but I am not sure how to link these to Sling's config.

Robert