0

I add hibernate-validator(6.0.9.Final) to my spring (not spring boot) maven project and work perfectly, but cause lot of(~3000 row) DEBUG log. How to off this log?

I tried these, but didn't work:

logging.level.org.hibernate=info
log4j.logger.org.hibernate=info
ZeroProcess
  • 1,140
  • 2
  • 10
  • 21

2 Answers2

2

The log level of Hibernate Validator is (obviously) not DEBUG by default so you must have something in your application classpath setting the log level to DEBUG.

Hibernate Validator is using JBoss Logging which uses log4j under the hood so log4j.logger.org.hibernate.validator=info in your log4j.properties should work.

But considering it shouldn't have been set to DEBUG in the first place, I'm wondering if you have something in your classpath overriding your log configuration.

I suspect either you or a dependency have enabled DEBUG logging for org.hibernate to see the queries or something similar and this is this setting you should find and remove.

Guillaume Smet
  • 9,921
  • 22
  • 29
0

Set the log4j properties as

log4j.logger.org.hibernate.validator=info

also set the show_sql =false to avoid the query printing on the console.

Sangam Belose
  • 4,262
  • 8
  • 26
  • 48