Skip to content

Commit a2263f9

Browse files
Simplify logger check.
1 parent 9cbf37d commit a2263f9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/AgentTestRunner.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,8 @@ abstract class AgentTestRunner extends DDSpecification implements AgentBuilder.L
293293
private static void configureLoggingLevels() {
294294
def logger = LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME)
295295

296-
if (!logger.class.name.equals("ch.qos.logback.classic.Logger")) {
296+
// Check logger class by name to avoid NoClassDefFoundError at runtime for tests without Logback.
297+
if (logger.class.name != "ch.qos.logback.classic.Logger") {
297298
return
298299
}
299300

0 commit comments

Comments
 (0)