teragrep / cfe_16

HTTP Event Capture to Syslog bridge
GNU Affero General Public License v3.0
1 stars 3 forks source link

reduced request logging #38

Open kortemik opened 3 months ago

kortemik commented 3 months ago
          perhaps it would be proper to have somekind of "new client from ip" type of logging, based on guava cache that "if ip in cache, no log, expire cache in 300 seconds -> log expired, otherwise no log as it is a known client" same for a token.

_Originally posted by @kortemik in https://github.com/teragrep/cfe_16/issues/34#issuecomment-2018056477_

kortemik commented 3 months ago

ip being here of either real or x-forwarded-for

StrongestNumber9 commented 3 months ago

Is it something that BurstFilter could accomplish? https://logging.apache.org/log4j/2.x/manual/filters.html#burstfilter

Stack Overflow suggests it could be done with logger configs like https://stackoverflow.com/a/72488146

<Logger name="com.example.SomeClass" level="INFO">
    <BurstFilter level="WARN" rate="10" maxBurst="20" />
</Logger>