This is an automated email from the ASF dual-hosted git repository. tilman pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/main by this push: new 6ba89786c TIKA-4290 fixed args in logging calls (#1902) 6ba89786c is described below commit 6ba89786c514f06a77f5fdb30a6a0893e779b875 Author: Dmitry Kryukov <d...@users.noreply.github.com> AuthorDate: Wed Aug 14 10:34:15 2024 +0300 TIKA-4290 fixed args in logging calls (#1902) * TIKA-4290 fixed args in logging calls --- tika-core/src/main/java/org/apache/tika/pipes/PipesServer.java | 2 +- .../src/main/java/org/apache/tika/fuzzing/cli/FuzzingCLI.java | 4 ++-- .../src/main/java/org/apache/tika/dl/imagerec/DL4JInceptionV3Net.java | 2 +- .../java/org/apache/tika/parser/microsoft/onenote/PropertyValue.java | 2 +- .../org/apache/tika/pipes/emitter/opensearch/OpenSearchClient.java | 2 +- .../java/org/apache/tika/pipes/reporters/jdbc/JDBCPipesReporter.java | 4 ++-- .../org/apache/tika/pipes/reporters/opensearch/OpenSearchClient.java | 2 +- .../main/java/org/apache/tika/server/core/FetcherStreamFactory.java | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tika-core/src/main/java/org/apache/tika/pipes/PipesServer.java b/tika-core/src/main/java/org/apache/tika/pipes/PipesServer.java index 9dc8a6fc1..dffb7c9ce 100644 --- a/tika-core/src/main/java/org/apache/tika/pipes/PipesServer.java +++ b/tika-core/src/main/java/org/apache/tika/pipes/PipesServer.java @@ -205,7 +205,7 @@ public class PipesServer implements Runnable { } public void processRequests() { - LOG.debug("processing requests {}"); + LOG.debug("processing requests"); //initialize try { long start = System.currentTimeMillis(); diff --git a/tika-fuzzing/src/main/java/org/apache/tika/fuzzing/cli/FuzzingCLI.java b/tika-fuzzing/src/main/java/org/apache/tika/fuzzing/cli/FuzzingCLI.java index bef5d8ec5..fb38c20f8 100644 --- a/tika-fuzzing/src/main/java/org/apache/tika/fuzzing/cli/FuzzingCLI.java +++ b/tika-fuzzing/src/main/java/org/apache/tika/fuzzing/cli/FuzzingCLI.java @@ -6,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -229,7 +229,7 @@ public class FuzzingCLI { case TIMEOUT: case UNSPECIFIED_CRASH: if (tries < maxRetries) { - LOG.info("trying again ({} of {}) {} : {}", tries, maxRetries, + LOG.info("trying again ({} of {}): {}", tries, maxRetries, status.name()); return true; } diff --git a/tika-parsers/tika-parsers-ml/tika-dl/src/main/java/org/apache/tika/dl/imagerec/DL4JInceptionV3Net.java b/tika-parsers/tika-parsers-ml/tika-dl/src/main/java/org/apache/tika/dl/imagerec/DL4JInceptionV3Net.java index 125e4e8d5..69b6b34dd 100644 --- a/tika-parsers/tika-parsers-ml/tika-dl/src/main/java/org/apache/tika/dl/imagerec/DL4JInceptionV3Net.java +++ b/tika-parsers/tika-parsers-ml/tika-dl/src/main/java/org/apache/tika/dl/imagerec/DL4JInceptionV3Net.java @@ -196,7 +196,7 @@ public class DL4JInceptionV3Net implements ObjectRecogniser { private File retrieveFile(String path) { File file = new File(path); if (!file.exists()) { - LOG.warn("File {} not found in local file system." + " Asking the classloader", path); + LOG.warn("File {} not found in local file system. Asking the classloader", path); URL url = getClass().getClassLoader().getResource(path); if (url == null) { LOG.debug("Classloader does not know the file {}", path); diff --git a/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/onenote/PropertyValue.java b/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/onenote/PropertyValue.java index 435ca4fc5..0f249e5ff 100644 --- a/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/onenote/PropertyValue.java +++ b/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/onenote/PropertyValue.java @@ -51,7 +51,7 @@ class PropertyValue { } if (type > 0 && type <= 6) { if (isRawText) { - LOG.debug("(%d)", scalar); + LOG.debug("{}", scalar); } } else if (type == 7) { OneNotePtr content = new OneNotePtr(pointer); diff --git a/tika-pipes/tika-emitters/tika-emitter-opensearch/src/main/java/org/apache/tika/pipes/emitter/opensearch/OpenSearchClient.java b/tika-pipes/tika-emitters/tika-emitter-opensearch/src/main/java/org/apache/tika/pipes/emitter/opensearch/OpenSearchClient.java index c757115a1..d9e5c3342 100644 --- a/tika-pipes/tika-emitters/tika-emitter-opensearch/src/main/java/org/apache/tika/pipes/emitter/opensearch/OpenSearchClient.java +++ b/tika-pipes/tika-emitters/tika-emitter-opensearch/src/main/java/org/apache/tika/pipes/emitter/opensearch/OpenSearchClient.java @@ -163,7 +163,7 @@ public class OpenSearchClient { ObjectMapper mapper = new ObjectMapper(); JsonNode node = mapper.readTree(reader); if (LOG.isTraceEnabled()) { - LOG.trace("node:", node); + LOG.trace("node: {}", node); } return new JsonResponse(200, node); } diff --git a/tika-pipes/tika-pipes-reporters/tika-pipes-reporter-jdbc/src/main/java/org/apache/tika/pipes/reporters/jdbc/JDBCPipesReporter.java b/tika-pipes/tika-pipes-reporters/tika-pipes-reporter-jdbc/src/main/java/org/apache/tika/pipes/reporters/jdbc/JDBCPipesReporter.java index a1ffc8b15..e31c0dc5a 100644 --- a/tika-pipes/tika-pipes-reporters/tika-pipes-reporter-jdbc/src/main/java/org/apache/tika/pipes/reporters/jdbc/JDBCPipesReporter.java +++ b/tika-pipes/tika-pipes-reporters/tika-pipes-reporter-jdbc/src/main/java/org/apache/tika/pipes/reporters/jdbc/JDBCPipesReporter.java @@ -395,7 +395,7 @@ public class JDBCPipesReporter extends PipesReporterBase implements Initializabl insert.addBatch(); } insert.executeBatch(); - LOG.debug("writing {} " + cache.size()); + LOG.debug("writing {} ", cache.size()); cache.clear(); return; } catch (SQLException e) { @@ -461,7 +461,7 @@ public class JDBCPipesReporter extends PipesReporterBase implements Initializabl try { insert.close(); } catch (SQLException e) { - LOG.warn("exception closing insert statement", insert); + LOG.warn("exception closing insert statement {}", insert); } } if (connection != null) { diff --git a/tika-pipes/tika-pipes-reporters/tika-pipes-reporter-opensearch/src/main/java/org/apache/tika/pipes/reporters/opensearch/OpenSearchClient.java b/tika-pipes/tika-pipes-reporters/tika-pipes-reporter-opensearch/src/main/java/org/apache/tika/pipes/reporters/opensearch/OpenSearchClient.java index 6e4d53073..639ff16bf 100644 --- a/tika-pipes/tika-pipes-reporters/tika-pipes-reporter-opensearch/src/main/java/org/apache/tika/pipes/reporters/opensearch/OpenSearchClient.java +++ b/tika-pipes/tika-pipes-reporters/tika-pipes-reporter-opensearch/src/main/java/org/apache/tika/pipes/reporters/opensearch/OpenSearchClient.java @@ -102,7 +102,7 @@ public class OpenSearchClient { ObjectMapper mapper = new ObjectMapper(); JsonNode node = mapper.readTree(reader); if (LOG.isTraceEnabled()) { - LOG.trace("node:", node); + LOG.trace("node: {}", node); } return new JsonResponse(200, node); } diff --git a/tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/FetcherStreamFactory.java b/tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/FetcherStreamFactory.java index 6331767a5..e7f1d210e 100644 --- a/tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/FetcherStreamFactory.java +++ b/tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/FetcherStreamFactory.java @@ -125,7 +125,7 @@ public class FetcherStreamFactory implements InputStreamFactory { try { return URLDecoder.decode(fetchKey, StandardCharsets.UTF_8.toString()); } catch (UnsupportedEncodingException | IllegalArgumentException e) { - LOG.warn("couldn't decode fetch key", fetchKey); + LOG.warn("couldn't decode fetch key {}", fetchKey); } return fetchKey; }