Prevent hibernate from throwing data into the logs

I am using JPA +Hibernate + Spring Boot for my applications. Hibernate is logging exception with stacktrace in my log file. I want to stop that and write my own error log without the stacktrace. Is there a setting in the hibernate config file to turn it off. I don’t really want to create an appender for hibernate in my log4j config and log them seperately I just want to turn off.

Hibernate just uses the underlying logging framework you are using, which AFAIU in case of Spring is log4j. So if you don’t want to log Hibernate stuff, then you will have to turn off the logging through log4j means for the org.hibernate loggers.