How to prevent log bombing using logback?

前端 未结 3 1973
误落风尘
误落风尘 2021-02-09 12:00

I\'m not sure the term \"bombing\" is the right one. By bombing, I mean a log happening many times with the same content (message and args).

For example, a denial of ser

3条回答
  •  野性不改
    2021-02-09 12:48

    I think I would prefer to solve the underlying issue that causes the logs to blow, rather then silencing the indication for the issue.

    You can configure a separate logger for the class which produces the abusing message and roll it independently of the main log.

      
      
    
      
      
    

    https://www.stubbornjava.com/posts/logging-in-java-with-slf4j-and-logback

提交回复
热议问题