diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/NodeInfo.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/NodeInfo.groovy index 014686e0207..cd0475d2aea 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/NodeInfo.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/NodeInfo.groovy @@ -130,6 +130,10 @@ class NodeInfo { env = [ 'JAVA_HOME' : project.javaHome ] args.addAll("-E", "node.portsfile=true") + String loggerLevel = System.getProperty("tests.logger.level") + if (loggerLevel != null) { + args.addAll("-E", "logger.level=${loggerLevel}") + } String collectedSystemProperties = config.systemProperties.collect { key, value -> "-D${key}=${value}" }.join(" ") String esJavaOpts = config.jvmArgs.isEmpty() ? collectedSystemProperties : collectedSystemProperties + " " + config.jvmArgs env.put('ES_JAVA_OPTS', esJavaOpts)