mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 01:22:26 -04:00
Cleanup redundant logger fields (#101655)
Making loggers static that can be made static, removing redundant test loggers (we already have the correct per class logger in this.logger) and also removing some just unused loggers.
This commit is contained in:
parent
8485cd7e83
commit
995b4d3c69
91 changed files with 82 additions and 229 deletions
|
@ -33,7 +33,7 @@ class RetryingHttpInputStream extends InputStream {
|
|||
public static final int MAX_SUPPRESSED_EXCEPTIONS = 10;
|
||||
public static final long MAX_RANGE_VAL = Long.MAX_VALUE - 1;
|
||||
|
||||
private final Logger logger = LogManager.getLogger(RetryingHttpInputStream.class);
|
||||
private static final Logger logger = LogManager.getLogger(RetryingHttpInputStream.class);
|
||||
|
||||
private final String blobName;
|
||||
private final URI blobURI;
|
||||
|
|
|
@ -37,7 +37,7 @@ import java.util.Map;
|
|||
public class URLHttpClient implements Closeable {
|
||||
public static final int MAX_ERROR_MESSAGE_BODY_SIZE = 1024;
|
||||
private static final int MAX_CONNECTIONS = 50;
|
||||
private final Logger logger = LogManager.getLogger(URLHttpClient.class);
|
||||
private static final Logger logger = LogManager.getLogger(URLHttpClient.class);
|
||||
|
||||
private final CloseableHttpClient client;
|
||||
private final URLHttpClientSettings httpClientSettings;
|
||||
|
@ -142,7 +142,7 @@ public class URLHttpClient implements Closeable {
|
|||
};
|
||||
}
|
||||
|
||||
private void handleInvalidResponse(CloseableHttpResponse response) {
|
||||
private static void handleInvalidResponse(CloseableHttpResponse response) {
|
||||
int statusCode = response.getStatusLine().getStatusCode();
|
||||
String errorBody = parseBodyAsString(response, MAX_ERROR_MESSAGE_BODY_SIZE);
|
||||
throw new URLHttpClientException(statusCode, createErrorMessage(statusCode, errorBody));
|
||||
|
@ -156,7 +156,7 @@ public class URLHttpClient implements Closeable {
|
|||
}
|
||||
}
|
||||
|
||||
private String parseBodyAsString(CloseableHttpResponse response, int maxSize) {
|
||||
private static String parseBodyAsString(CloseableHttpResponse response, int maxSize) {
|
||||
String errorMessage = "";
|
||||
InputStream bodyContent = null;
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue