JUnit formatter: Guard against log messages that are triggered outside of a test case context