We wrote our own logging framework primarily because log4j didn't provide some of the features we needed. One feature was more granularity, especially around logging. We encourage entry and exit tracing, logging of input and output data, logging of elapsed time statistics and several other flavors if "debug" information. Turning all this on in production generates too much data. Our framework supported the concept of Log Type in addition to Log Level. When filtering there was a LogType array where each array element was the log level. The LogRecord contained the LogType and LogLevel so doing filtering was very fast.
SLF4J supports Markers. These can essentially be used for the same purpose (assuming another Jira issue regarding filtering is implemented). Markers are much more flexible since they can be arbitrarily created. Loggers should then be able to filter on whether a marker is present in addition to the LogLevel.