Log4j2 has an Arbiter interface that allows blocks of configuration to be skipped. We can offer an implementation backed by Spring's profile support.