Disallow logger methods with Object parameter

Relates to elastic/elasticsearch#28969

Original commit: elastic/x-pack-elasticsearch@1eff5eecd9
This commit is contained in:
Yannick Welsch 2018-03-12 10:53:27 +01:00
parent 15ab4af157
commit 4bce53a1ad
3 changed files with 9 additions and 2 deletions

View File

@ -121,7 +121,7 @@ public class TransportStartDatafeedAction extends TransportMasterNodeAction<Star
@Override
public void onFailure(Exception e) {
if (e instanceof ResourceAlreadyExistsException) {
logger.debug(e);
logger.debug("datafeed already started", e);
e = new ElasticsearchStatusException("cannot start datafeed [" + params.getDatafeedId() +
"] because it has already been started", RestStatus.CONFLICT);
}

View File

@ -1392,7 +1392,7 @@ public final class TokenService extends AbstractComponent {
try {
refreshMetaData(custom);
} catch (Exception e) {
logger.warn(e);
logger.warn("refreshing metadata failed", e);
}
logger.info("refreshed keys");
}

View File

@ -5,6 +5,8 @@
* be called "proto" there.
*/
import org.elasticsearch.gradle.precommit.PrecommitTasks
apply plugin: 'elasticsearch.build'
description = 'Request and response objects shared by the cli, jdbc ' +
@ -29,6 +31,11 @@ dependencies {
testCompile "org.elasticsearch.test:framework:${version}"
}
forbiddenApisMain {
//sql does not depend on server, so only jdk signatures should be checked
signaturesURLs = [PrecommitTasks.getResource('/forbidden/jdk-signatures.txt')]
}
dependencyLicenses {
mapping from: /elasticsearch-core.*/, to: 'elasticsearch'
mapping from: /jackson-.*/, to: 'jackson'