Search in sources :

Example 51 with Appender

use of ch.qos.logback.core.Appender 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 52 with Appender

use of ch.qos.logback.core.Appender 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)

Example 53 with Appender

use of ch.qos.logback.core.Appender in project qpid-broker-j by apache.

the class JDBCBrokerLoggerImplTest method detachAppenderInstanceOnDelete.

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

Example 54 with Appender

use of ch.qos.logback.core.Appender in project qpid-broker-j by apache.

the class JDBCBrokerLoggerImplTest method closeAndReopenLogger.

@Test
public void closeAndReopenLogger() {
    _logger.create();
    _logger.close();
    final Appender appender = ROOT_LOGGER.getAppender(getTestName());
    assertNotNull(appender);
    _logger.open();
    assertSame(appender, ROOT_LOGGER.getAppender(getTestName()));
}
Also used : DBAppender(ch.qos.logback.classic.db.DBAppender) Appender(ch.qos.logback.core.Appender) Test(org.junit.Test)

Example 55 with Appender

use of ch.qos.logback.core.Appender 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)

Aggregations

Appender (ch.qos.logback.core.Appender)118 Test (org.junit.Test)62 ILoggingEvent (ch.qos.logback.classic.spi.ILoggingEvent)51 Logger (ch.qos.logback.classic.Logger)32 LoggerContext (ch.qos.logback.classic.LoggerContext)32 FileAppender (ch.qos.logback.core.FileAppender)27 Logger (org.slf4j.Logger)25 ConsoleAppender (ch.qos.logback.core.ConsoleAppender)21 ArgumentMatcher (org.mockito.ArgumentMatcher)19 AsyncAppender (ch.qos.logback.classic.AsyncAppender)18 File (java.io.File)14 OnMarkerEvaluator (ch.qos.logback.classic.boolex.OnMarkerEvaluator)13 EvaluatorFilter (ch.qos.logback.core.filter.EvaluatorFilter)13 LogstashTcpSocketAppender (net.logstash.logback.appender.LogstashTcpSocketAppender)13 ArrayList (java.util.ArrayList)11 ApplicationService (org.codice.ddf.admin.application.service.ApplicationService)11 OutputStreamAppender (ch.qos.logback.core.OutputStreamAppender)10 RollingFileAppender (ch.qos.logback.core.rolling.RollingFileAppender)9 DBAppender (ch.qos.logback.classic.db.DBAppender)8 Test (org.junit.jupiter.api.Test)7