In unit tests it can be useful to suppress all logging for successful tests but still log everything when tests fail In order to accomplish this we need to buffer all logging before we know the result of the test and then flush or clear the buffer once we know the outcome BufferedAppender is the logback appender that buffers all logging until it receives a or marker You can use directly in logback configuration It requires a delegate appender for flushing declared using an lives in the module Log Markers We must log and markers to instruct to clear or flush its logs If you are using JUnit 4 or 5 you can use the included Rule or Extension to log these markers automatically JUnit 4 is a JUnit 4 that clears the buffer before all tests and flushes the buffer after failed tests It does this by logging and markers lives in the module LogMarkerTestRule Rule CLEAR FLUSH public class ExampleTest @Rule public final TestRule logMarkerTestRule new LogMarkerTestRule @Test public void smokeTest test code LogMarkerTestRule liftwizard junit rule log marker <dependency> <groupId>io liftwizard< groupId> <artifactId>liftwizard junit rule log marker< artifactId> <scope>test< scope> < dependency> JUnit 5 is a JUnit 5 that clears the buffer before all tests and flushes the buffer after failed tests It does this by logging and markers lives in the module LogMarkerTestExtension Extension CLEAR FLUSH @ExtendWith LogMarkerTestExtension class public class ExampleTest @Test public void smokeTest test code LogMarkerTestExtension liftwizard junit extension log marker <dependency> <groupId>io liftwizard< groupId> <artifactId>liftwizard junit extension log marker< artifactId> <scope>test< scope> < dependency> BufferedAppenderFactory The allows you to use an appender with the type where you would otherwise use in your Dropwizard configuration lives in the module Note is primarily useful for tests that use Dropwizard s JUnit 4 Rule or Dropwizard s JUnit 5 Extension Note needs to be an inner rule with any other rules that tear down logging outer to it BufferedAppender CLEAR FLUSH appender ref BufferedAppender liftwizard logging buffered appender <dependency> <groupId>io liftwizard< groupId> <artifactId>liftwizard logging buffered appender< artifactId> <scope>test< scope> < dependency> CLEAR FLUSH BufferedAppender BufferedAppenderFactory buffered console logging level DEBUG appenders type buffered timeZone $ LOGGING_TIMEZONE system logFormat %highlight % 5level %cyan %date HH mm ss SSS %dwTimeZone %gray %file %line %white %thread %blue %marker %magenta %mdc %green %logger %message%n%rootException includeCallerData true BufferedAppenderFactory liftwizard config logging buffered <dependency> <groupId>io liftwizard< groupId> <artifactId>liftwizard config logging buffered< artifactId> <scope>test< scope> < dependency> BufferedAppenderFactory DropwizardAppRule DropwizardAppExtension private final TestRule logMarkerTestRule new LogMarkerTestRule private final DropwizardAppRule<HelloWorldConfiguration> dropwizardAppRule new DropwizardAppRule<> HelloWorldApplication class ResourceHelpers resourceFilePath test example json5 @Rule public final RuleChain ruleChain RuleChain outerRule this dropwizardAppRule around this logMarkerTestRule LogMarkerTestRule