Skip to content

Commit b7fd7cf

Browse files
authored
Write deprecation logs to a data stream (#61966)
Backport of #58924. Closes #46106. Introduce a mechanism for writing deprecation logs to a data stream as well as to disk.
1 parent a4fb501 commit b7fd7cf

File tree

15 files changed

+1018
-304
lines changed

15 files changed

+1018
-304
lines changed

server/src/main/java/org/elasticsearch/common/logging/DeprecatedMessage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919

2020
package org.elasticsearch.common.logging;
2121

22+
import java.util.Map;
23+
2224
import org.elasticsearch.common.Strings;
2325
import org.elasticsearch.common.collect.MapBuilder;
2426

25-
import java.util.Map;
26-
2727
/**
2828
* A logger message used by {@link DeprecationLogger}.
2929
* Carries x-opaque-id field if provided in the headers. Will populate the x-opaque-id field in JSON logs.

x-pack/plugin/deprecation/build.gradle

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
apply plugin: 'elasticsearch.esplugin'
2-
apply plugin: 'elasticsearch.internal-cluster-test'
32

43
esplugin {
54
name 'x-pack-deprecation'
@@ -9,6 +8,15 @@ esplugin {
98
}
109
archivesBaseName = 'x-pack-deprecation'
1110

11+
// add all sub-projects of the qa sub-project
12+
gradle.projectsEvaluated {
13+
project.subprojects
14+
.find { it.path == project.path + ":qa" }
15+
.subprojects
16+
.findAll { it.path.startsWith(project.path + ":qa") }
17+
.each { check.dependsOn it.check }
18+
}
19+
1220
dependencies {
1321
compileOnly project(":x-pack:plugin:core")
1422
}

x-pack/plugin/deprecation/qa/build.gradle

Whitespace-only changes.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
apply plugin: 'elasticsearch.esplugin'
2+
apply plugin: 'elasticsearch.java-rest-test'
3+
4+
esplugin {
5+
description 'Deprecated query plugin'
6+
classname 'org.elasticsearch.xpack.deprecation.TestDeprecationPlugin'
7+
}
8+
9+
dependencies {
10+
javaRestTestImplementation("com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}")
11+
javaRestTestImplementation("com.fasterxml.jackson.core:jackson-databind:${versions.jackson}")
12+
// let the javaRestTest see the classpath of main
13+
javaRestTestImplementation project.sourceSets.main.runtimeClasspath
14+
}
15+
16+
restResources {
17+
restApi {
18+
includeCore '_common', 'indices', 'index'
19+
}
20+
}
21+
22+
testClusters.all {
23+
testDistribution = 'DEFAULT'
24+
setting 'xpack.security.enabled', 'false'
25+
}
26+
27+
test.enabled = false

0 commit comments

Comments
 (0)