Skip to content

Commit 6794f92

Browse files
authored
Merge pull request #288 from domaframework/slf4j-logger
Change the default logger from java.util.logging to SLF4J
2 parents a8c778c + 3b704f4 commit 6794f92

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

doma-spring-boot-autoconfigure/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
<groupId>org.seasar.doma</groupId>
2727
<artifactId>doma-slf4j</artifactId>
2828
<version>${doma.version}</version>
29-
<optional>true</optional>
3029
</dependency>
3130
<dependency>
3231
<groupId>org.springframework</groupId>

doma-spring-boot-autoconfigure/src/main/java/org/seasar/doma/boot/autoconfigure/DomaProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public class DomaProperties {
7575
/**
7676
* Type of {@link JdbcLogger}.
7777
*/
78-
private JdbcLoggerType jdbcLogger = JdbcLoggerType.JUL;
78+
private JdbcLoggerType jdbcLogger = JdbcLoggerType.SLF4J;
7979

8080
/**
8181
* Limit for the maximum number of rows. Ignored unless this value is greater than 0.

doma-spring-boot-autoconfigure/src/test/java/org/seasar/doma/boot/autoconfigure/DomaAutoConfigurationTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
import org.seasar.doma.jdbc.statistic.DefaultStatisticManager;
5858
import org.seasar.doma.jdbc.statistic.StatisticManager;
5959
import org.seasar.doma.message.Message;
60+
import org.seasar.doma.slf4j.Slf4jJdbcLogger;
6061
import org.springframework.beans.factory.BeanCreationException;
6162
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
6263
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
@@ -96,7 +97,7 @@ public void testAutoRegisteredConfig() {
9697
assertThat(config.getSqlFileRepository(),
9798
is(instanceOf(GreedyCacheSqlFileRepository.class)));
9899
assertThat(config.getNaming(), is(Naming.DEFAULT));
99-
assertThat(config.getJdbcLogger(), is(instanceOf(UtilLoggingJdbcLogger.class)));
100+
assertThat(config.getJdbcLogger(), is(instanceOf(Slf4jJdbcLogger.class)));
100101
assertThat(config.getEntityListenerProvider(), is(notNullValue()));
101102
assertThat(config.getDuplicateColumnHandler(),
102103
is(ConfigSupport.defaultDuplicateColumnHandler));

0 commit comments

Comments
 (0)