Log MongoDB queries with Spring Boot

后端 未结 3 1018
小鲜肉
小鲜肉 2020-12-30 08:31

Is it possible to log all MongoDB queries in my Spring Boot app? I tried this:

logging.level.org.springframework.data.document.mongodb=INFO
log4j.category.or         


        
3条回答
  •  隐瞒了意图╮
    2020-12-30 08:45

    If using spring boot reactive mongodb, set logging.level.org.springframework.data.mongodb.core.ReactiveMongoTemplate=DEBUG

提交回复
热议问题