diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/AntTask.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/AntTask.groovy index b713c00ed8d..f86846ac6dd 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/AntTask.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/AntTask.groovy @@ -52,7 +52,7 @@ public class AntTask extends DefaultTask { // remove existing loggers, we add our own List toRemove = new ArrayList<>(); for (BuildListener listener : ant.project.getBuildListeners()) { - if (l instanceof BuildLogger) { + if (listener instanceof BuildLogger) { toRemove.add(listener); } }