mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-24 05:44:59 +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);
|
logger.error("{} `{}`", description, this);
|
||||||
try(Stream<String> lines = Files.lines(from, StandardCharsets.UTF_8)) {
|
try(Stream<String> lines = Files.lines(from, StandardCharsets.UTF_8)) {
|
||||||
lines
|
lines
|
||||||
.map(line -> " [" + name + "]" + line)
|
.map(line -> " " + line)
|
||||||
.forEach(logger::error);
|
.forEach(logger::error);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new UncheckedIOException(e);
|
throw new UncheckedIOException(e);
|
||||||
|
@ -332,7 +332,9 @@ public class TestClustersPlugin implements Plugin<Project> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void shutDownAllClusters() {
|
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) {
|
synchronized (runningClusters) {
|
||||||
runningClusters.forEach(each -> each.stop(true));
|
runningClusters.forEach(each -> each.stop(true));
|
||||||
runningClusters.clear();
|
runningClusters.clear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user