mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-23 21:38:15 +00:00
Testclusters logging improovements (#37354)
- Cluster logs are only indented as node name is already in the logs - silence logging on shutdown - have fully qualified name as node and cluster name
This commit is contained in:
parent
be6bdab346
commit
97e89ad0bc
@ -288,7 +288,7 @@ public class ElasticsearchNode {
|
||||
logger.error("{} `{}`", description, this);
|
||||
try(Stream<String> lines = Files.lines(from, StandardCharsets.UTF_8)) {
|
||||
lines
|
||||
.map(line -> " [" + name + "]" + line)
|
||||
.map(line -> " " + line)
|
||||
.forEach(logger::error);
|
||||
} catch (IOException e) {
|
||||
throw new UncheckedIOException(e);
|
||||
|
@ -332,7 +332,9 @@ public class TestClustersPlugin implements Plugin<Project> {
|
||||
}
|
||||
|
||||
private static void shutDownAllClusters() {
|
||||
logger.info("Shutting down all test clusters", new RuntimeException());
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Shutting down all test clusters", new RuntimeException());
|
||||
}
|
||||
synchronized (runningClusters) {
|
||||
runningClusters.forEach(each -> each.stop(true));
|
||||
runningClusters.clear();
|
||||
|
Loading…
x
Reference in New Issue
Block a user