I'm trying to remove all sql logs from my project but It seems that does not work.
I've tried to use the code bellow on my properties but the logs keep showing up.
spring.jpa.properties.hibernate.show_sql=false
logging.level.org.hibernate.SQL=TRACE
I also tried to debug my project and I see that the logs are from class SqlStatementLogger
@AllowSysOut
public void logStatement(String statement, Formatter formatter) {
if ( format ) {
if ( logToStdout || LOG.isDebugEnabled() ) {
statement = formatter.format( statement );
}
}
LOG.debug( statement );
if ( logToStdout ) {
System.out.println( "Hibernate: " + statement );
}
}
And this class I can′t edit... There′s some way to remove that line "LOG.debug( statement );" ? Or another way that don′t show up the sql logs?
question from:
https://stackoverflow.com/questions/65937847/remove-sql-logs-hibernate-sqlstatementlogger 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…