Search in sources :

Example 1 with EmittingRequestLogger

use of org.apache.druid.server.log.EmittingRequestLogger in project druid by druid-io.

the class QueryableModuleTest method testGetEmitterRequestLoggerProvider.

@Test
public void testGetEmitterRequestLoggerProvider() {
    Properties properties = new Properties();
    properties.setProperty("druid.request.logging.type", "emitter");
    properties.setProperty("druid.request.logging.feed", "requestlog");
    final Injector injector = makeInjector(properties);
    RequestLoggerProvider emittingRequestLoggerProvider = injector.getInstance(RequestLoggerProvider.class);
    Assert.assertTrue(emittingRequestLoggerProvider instanceof EmittingRequestLoggerProvider);
    RequestLogger requestLogger = emittingRequestLoggerProvider.get();
    Assert.assertTrue(requestLogger instanceof EmittingRequestLogger);
}
Also used : EmittingRequestLoggerProvider(org.apache.druid.server.log.EmittingRequestLoggerProvider) Injector(com.google.inject.Injector) RequestLoggerProvider(org.apache.druid.server.log.RequestLoggerProvider) EmittingRequestLoggerProvider(org.apache.druid.server.log.EmittingRequestLoggerProvider) NoopRequestLoggerProvider(org.apache.druid.server.log.NoopRequestLoggerProvider) EmittingRequestLogger(org.apache.druid.server.log.EmittingRequestLogger) NoopRequestLogger(org.apache.druid.server.log.NoopRequestLogger) RequestLogger(org.apache.druid.server.log.RequestLogger) EmittingRequestLogger(org.apache.druid.server.log.EmittingRequestLogger) Properties(java.util.Properties) Test(org.junit.Test)

Aggregations

Injector (com.google.inject.Injector)1 Properties (java.util.Properties)1 EmittingRequestLogger (org.apache.druid.server.log.EmittingRequestLogger)1 EmittingRequestLoggerProvider (org.apache.druid.server.log.EmittingRequestLoggerProvider)1 NoopRequestLogger (org.apache.druid.server.log.NoopRequestLogger)1 NoopRequestLoggerProvider (org.apache.druid.server.log.NoopRequestLoggerProvider)1 RequestLogger (org.apache.druid.server.log.RequestLogger)1 RequestLoggerProvider (org.apache.druid.server.log.RequestLoggerProvider)1 Test (org.junit.Test)1