SumoLogic / sumologic-log4j2-appender

Log4J 2 Appender for Sumo Logic.
Apache License 2.0
11 stars 10 forks source link

Turning off "SumoBufferFlusherThread" log messages #24

Open aimtiaz11 opened 4 years ago

aimtiaz11 commented 4 years ago

Hi, I am seeing a large number of DEBUG messages of similar type to below which are filling up in Sumo Logic pretty much accompanying all logs getting pushed.

DEBUG 2020-04-21 13:44:18,818 [SumoBufferFlusherThread] : Tue Apr 21 13:44:18 AEST 2020 - Flushing and sending out 147 messages (0 messages left)
DEBUG 2020-04-21 13:44:18,818 [SumoBufferFlusherThread] : Sending out data

Is there a way to turn this log messages off from a setting/config in log4j2.xml?

Thanks.

HariprasathUdayakumar commented 2 years ago

Hi @aimtiaz11 , Were you able to find a solution for this issue? We are facing the same in MuleSoft and it would be really helpful if you can share the solution implemented?

Regards, Hariprasath Udayakumar.

aimtiaz11 commented 2 years ago

@HariprasathUdayakumar , Only way is by adding filters to log4j to exclude those log entries.

<Filters>
        <RegexFilter regex=".*Flushing and sending out.*" onMatch="DENY" onMismatch="NEUTRAL"/>
        <RegexFilter regex="Sending out data" onMatch="DENY" onMismatch="NEUTRAL"/>
        <RegexFilter regex="Successfully sent log request to Sumo Logic" onMatch="DENY" onMismatch="NEUTRAL"/>
   </Filters>