From 89197eb03b92bbcbed9ebc6293d57beab17bbcd1 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Mon, 13 Oct 2014 17:52:05 +0100 Subject: [PATCH] Add org.hibernate.SQL to the --debug logger levels I think this fixes gh-446 (it seems unreasonable to want to log the DDL even if it is not being executed) --- .../src/main/resources/application.properties | 1 + .../springframework/boot/logging/LoggingApplicationListener.java | 1 + 2 files changed, 2 insertions(+) create mode 100644 spring-boot-samples/spring-boot-sample-data-jpa/src/main/resources/application.properties diff --git a/spring-boot-samples/spring-boot-sample-data-jpa/src/main/resources/application.properties b/spring-boot-samples/spring-boot-sample-data-jpa/src/main/resources/application.properties new file mode 100644 index 0000000000..51d574f30d --- /dev/null +++ b/spring-boot-samples/spring-boot-sample-data-jpa/src/main/resources/application.properties @@ -0,0 +1 @@ +debug= \ No newline at end of file diff --git a/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java b/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java index 8b465da0a8..12daee9553 100644 --- a/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java +++ b/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java @@ -91,6 +91,7 @@ public class LoggingApplicationListener implements SmartApplicationListener { LOG_LEVEL_LOGGERS.add(LogLevel.TRACE, "org.apache.catalina"); LOG_LEVEL_LOGGERS.add(LogLevel.TRACE, "org.eclipse.jetty"); LOG_LEVEL_LOGGERS.add(LogLevel.TRACE, "org.hibernate.tool.hbm2ddl"); + LOG_LEVEL_LOGGERS.add(LogLevel.DEBUG, "org.hibernate.SQL"); } private static Class[] EVENT_TYPES = { ApplicationStartedEvent.class,