From 76f310ea15e2b91f0a6954622df9e3aa7103cee7 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Fri, 20 May 2016 10:40:55 -0400 Subject: [PATCH] Passthrough test logger level to nodes This commit passes the system property tests.logger.level down to the external nodes launched in integration tests. Specific tests that want to override the default logging level should push down a setting to the nodes using cluster configuration instead of pushing down a system property to the nodes using cluster configuration. Relates #18489 --- .../main/groovy/org/elasticsearch/gradle/test/NodeInfo.groovy | 4 ++++ 1 file changed, 4 insertions(+) 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)