Search in sources :

Example 1 with DBAppender

use of ch.qos.logback.classic.db.DBAppender in project qpid-broker-j by apache.

the class JDBCVirtualHostLoggerImplTest method createAppenderOnCreate.

@Test
public void createAppenderOnCreate() {
    _logger.create();
    final Appender appender = ROOT_LOGGER.getAppender(getTestName());
    assertTrue(appender instanceof DBAppender);
}
Also used : DBAppender(ch.qos.logback.classic.db.DBAppender) Appender(ch.qos.logback.core.Appender) DBAppender(ch.qos.logback.classic.db.DBAppender) Test(org.junit.Test)

Example 2 with DBAppender

use of ch.qos.logback.classic.db.DBAppender in project qpid-broker-j by apache.

the class JDBCVirtualHostLoggerImplTest method createAppenderOnOpen.

@Test
public void createAppenderOnOpen() {
    _logger.open();
    final Appender appender = ROOT_LOGGER.getAppender(getTestName());
    assertTrue(appender instanceof DBAppender);
}
Also used : DBAppender(ch.qos.logback.classic.db.DBAppender) Appender(ch.qos.logback.core.Appender) DBAppender(ch.qos.logback.classic.db.DBAppender) Test(org.junit.Test)

Example 3 with DBAppender

use of ch.qos.logback.classic.db.DBAppender in project qpid-broker-j by apache.

the class JDBCLoggerHelperTest method createAppenderInstance.

@Test
public void createAppenderInstance() {
    final LoggerContext context = ROOT_LOGGER.getLoggerContext();
    final Appender<ILoggingEvent> appender = _jdbcLoggerHelper.createAppenderInstance(context, _broker, _jdbcSettings);
    assertTrue(appender instanceof DBAppender);
    assertTrue(appender.isStarted());
    assertEquals(context, appender.getContext());
    assertTrue(((DBAppender) appender).getConnectionSource() instanceof JDBCSettingsDrivenConnectionSource);
}
Also used : DBAppender(ch.qos.logback.classic.db.DBAppender) ILoggingEvent(ch.qos.logback.classic.spi.ILoggingEvent) LoggerContext(ch.qos.logback.classic.LoggerContext) Test(org.junit.Test)

Example 4 with DBAppender

use of ch.qos.logback.classic.db.DBAppender in project qpid-broker-j by apache.

the class JDBCBrokerLoggerImplTest method createAppenderOnOpen.

@Test
public void createAppenderOnOpen() {
    _logger.open();
    final Appender appender = ROOT_LOGGER.getAppender(getTestName());
    assertTrue(appender instanceof DBAppender);
}
Also used : DBAppender(ch.qos.logback.classic.db.DBAppender) Appender(ch.qos.logback.core.Appender) DBAppender(ch.qos.logback.classic.db.DBAppender) Test(org.junit.Test)

Example 5 with DBAppender

use of ch.qos.logback.classic.db.DBAppender in project qpid-broker-j by apache.

the class JDBCBrokerLoggerImplTest method createAppenderOnCreate.

@Test
public void createAppenderOnCreate() {
    _logger.create();
    final Appender appender = ROOT_LOGGER.getAppender(getTestName());
    assertTrue(appender instanceof DBAppender);
}
Also used : DBAppender(ch.qos.logback.classic.db.DBAppender) Appender(ch.qos.logback.core.Appender) DBAppender(ch.qos.logback.classic.db.DBAppender) Test(org.junit.Test)

Aggregations

DBAppender (ch.qos.logback.classic.db.DBAppender)8 Test (org.junit.Test)6 Appender (ch.qos.logback.core.Appender)4 ConnectionSource (ch.qos.logback.core.db.ConnectionSource)3 LoggerContext (ch.qos.logback.classic.LoggerContext)1 ILoggingEvent (ch.qos.logback.classic.spi.ILoggingEvent)1 IllegalConfigurationException (org.apache.qpid.server.configuration.IllegalConfigurationException)1