class ConnectionLoggerFactory {

    static ConnectionLogger newEvictingLogger(
            final int successCapacity, final int failureCapacity,
            final LogCategory logCategory, final LogType logType,
            @Nullable final String address) {

        switch (logCategory) {
            case SOURCE:
                return newSourceLogger(logType, successCapacity, failureCapacity, address);
            case TARGET:
                return newTargetLogger(logType, successCapacity, failureCapacity, address);
            case RESPONSE:
                return newResponseLogger(logType, successCapacity, failureCapacity, address);
            case CONNECTION:
                return newConnectionLogger(logType, successCapacity, failureCapacity, address);
            default:
                throw new AssertionError("Missing switch case.");
        }

    }

    private  ConnectionLoggerFactory();

}