use of org.apache.qpid.server.logging.logback.AbstractBrokerLogger in project qpid-broker-j by apache.
the class BrokerLoggerTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
_taskExecutor = new TaskExecutorImpl();
_taskExecutor.start();
_loggerAppender = new ListAppender<>();
_loggerAppender.setName(APPENDER_NAME);
Model model = BrokerModel.getInstance();
_broker = mock(Broker.class);
when(_broker.getCategoryClass()).thenReturn(Broker.class);
when(_broker.getTypeClass()).thenReturn(Broker.class);
when(_broker.getModel()).thenReturn(model);
when(_broker.getChildExecutor()).thenReturn(_taskExecutor);
doReturn(Broker.class).when(_broker).getCategoryClass();
Map<String, Object> attributes = new HashMap<>();
attributes.put("name", APPENDER_NAME);
_brokerLogger = new AbstractBrokerLogger(attributes, _broker) {
@Override
public Appender<ILoggingEvent> createAppenderInstance(Context context) {
return _loggerAppender;
}
};
_brokerLogger.open();
}
Aggregations