diff --git a/server/src/main/java/org/apache/druid/guice/QueryableModule.java b/server/src/main/java/org/apache/druid/guice/QueryableModule.java index ee4409138fa..7bd19413214 100644 --- a/server/src/main/java/org/apache/druid/guice/QueryableModule.java +++ b/server/src/main/java/org/apache/druid/guice/QueryableModule.java @@ -64,6 +64,7 @@ public class QueryableModule implements DruidModule return Collections.singletonList( new SimpleModule("QueryableModule") .registerSubtypes( + NoopRequestLoggerProvider.class, EmittingRequestLoggerProvider.class, FileRequestLoggerProvider.class, LoggingRequestLoggerProvider.class, diff --git a/server/src/test/java/org/apache/druid/server/log/LoggingRequestLoggerProviderTest.java b/server/src/test/java/org/apache/druid/server/log/LoggingRequestLoggerProviderTest.java index 6f6d8d1fdaa..11c7db40af3 100644 --- a/server/src/test/java/org/apache/druid/server/log/LoggingRequestLoggerProviderTest.java +++ b/server/src/test/java/org/apache/druid/server/log/LoggingRequestLoggerProviderTest.java @@ -31,6 +31,7 @@ import org.apache.druid.guice.JsonConfigurator; import org.apache.druid.guice.ManageLifecycle; import org.apache.druid.guice.QueryableModule; import org.apache.druid.initialization.Initialization; +import org.hamcrest.Matchers; import org.junit.Assert; import org.junit.Test; @@ -70,6 +71,15 @@ public class LoggingRequestLoggerProviderTest Assert.assertTrue(requestLogger.isSetMDC()); } + @Test + public void testNoopConfigParsing() + { + final Properties properties = new Properties(); + properties.put(propertyPrefix + ".type", "noop"); + provider.inject(properties, injector.getInstance(JsonConfigurator.class)); + Assert.assertThat(provider.get().get().get(), Matchers.instanceOf(NoopRequestLogger.class)); + } + private Injector makeInjector() { return Initialization.makeInjectorWithModules(