Search in sources :

Example 1 with RequestLogger

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

the class QueryableModuleTest method testGetDefaultRequestLoggerProvider.

@Test
public void testGetDefaultRequestLoggerProvider() {
    Properties properties = new Properties();
    final Injector injector = makeInjector(properties);
    RequestLoggerProvider emittingRequestLoggerProvider = injector.getInstance(RequestLoggerProvider.class);
    Assert.assertTrue(emittingRequestLoggerProvider instanceof NoopRequestLoggerProvider);
    RequestLogger requestLogger = emittingRequestLoggerProvider.get();
    Assert.assertTrue(requestLogger instanceof NoopRequestLogger);
}
Also used : NoopRequestLoggerProvider(org.apache.druid.server.log.NoopRequestLoggerProvider) 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) NoopRequestLogger(org.apache.druid.server.log.NoopRequestLogger) Properties(java.util.Properties) Test(org.junit.Test)

Example 2 with RequestLogger

use of org.apache.druid.server.log.RequestLogger 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)2 Properties (java.util.Properties)2 EmittingRequestLogger (org.apache.druid.server.log.EmittingRequestLogger)2 EmittingRequestLoggerProvider (org.apache.druid.server.log.EmittingRequestLoggerProvider)2 NoopRequestLogger (org.apache.druid.server.log.NoopRequestLogger)2 NoopRequestLoggerProvider (org.apache.druid.server.log.NoopRequestLoggerProvider)2 RequestLogger (org.apache.druid.server.log.RequestLogger)2 RequestLoggerProvider (org.apache.druid.server.log.RequestLoggerProvider)2 Test (org.junit.Test)2