Search code examples
spring-bootspring-securityspring-security-rest

Spring boot disable filter log


I see logging message kind of below.

/api/1/0/abc at position 1 of 9 in additional filter chain; firing Filter: 'WebAsyncManagerIntegrationFilter'
/api/1/0/abc at position 2 of 9 in additional filter chain; firing Filter: 'SecurityContextPersistentFilter'
/api/1/0/abc at position 6 of 9 in additional filter chain; firing Filter: 'SecurityContextHolderAwareRequestFilter'
/api/1/0/abc at position 5 of 9 in additional filter chain; firing Filter: 'RequestCacheAwareFilter'
/api/1/0/abc at position 6 of 9 in additional filter chain; firing Filter: 'SecurityContextHolderAwareRequestFilter'
    /api/1/0/abc at position 6 of 9 in additional filter chain; firing Filter: 'AnonymousAutenticationFilter'

All the security filter log i want to disable.


Solution

  • To set the logging level on the filters you can simply add to your application level.

    logging.level.org.springframework.web.filter=ERROR
    

    You have the following options to set the log level to:

    ERROR, WARN, INFO, DEBUG, TRACE