Just curious, what's the point of using NullAppender (which I believe is an Appender that does nothing), while you might just not install any application in the log?
And the right way to turn off the entire log is to set the log level to OFF.
With a comment from @djechlin, I find the filters in LogBack also worth mentioning. If you just want to disable all messages passing through the application, you can simply use the Threshold Filter:
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>OFF</level> </filter> .... other config </appender>
source share