Search in sources :

Example 1 with BrokerFileLogger

use of org.apache.qpid.server.logging.logback.BrokerFileLogger in project qpid-broker-j by apache.

the class BrokerFileLoggerTest method createLoggerInErroredState.

private BrokerFileLogger createLoggerInErroredState() {
    Map<String, Object> attributes = new HashMap<>();
    attributes.put(BrokerLogger.NAME, getTestName());
    attributes.put(ConfiguredObject.TYPE, BrokerFileLogger.TYPE);
    attributes.put(BrokerFileLogger.FILE_NAME, _logFile.getPath());
    attributes.put(BrokerFileLogger.MAX_FILE_SIZE, "invalid");
    BrokerFileLogger logger = new BrokerFileLoggerImpl(attributes, _broker);
    logger.open();
    assertEquals("Unexpected state", State.ERRORED, logger.getState());
    return logger;
}
Also used : BrokerFileLogger(org.apache.qpid.server.logging.logback.BrokerFileLogger) BrokerFileLoggerImpl(org.apache.qpid.server.logging.logback.BrokerFileLoggerImpl) HashMap(java.util.HashMap) ConfiguredObject(org.apache.qpid.server.model.ConfiguredObject)

Aggregations

HashMap (java.util.HashMap)1 BrokerFileLogger (org.apache.qpid.server.logging.logback.BrokerFileLogger)1 BrokerFileLoggerImpl (org.apache.qpid.server.logging.logback.BrokerFileLoggerImpl)1 ConfiguredObject (org.apache.qpid.server.model.ConfiguredObject)1