This is an automated email from the ASF dual-hosted git repository. tallison 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 7b548f760 TIKA-3921 -- add a simle logging pipes reporter 7b548f760 is described below commit 7b548f7603b00071ff0e80cf0e29279a5840bf72 Author: tballison <talli...@apache.org> AuthorDate: Tue Nov 8 17:02:36 2022 -0500 TIKA-3921 -- add a simle logging pipes reporter --- .../apache/tika/pipes/LoggingPipesReporter.java | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tika-core/src/main/java/org/apache/tika/pipes/LoggingPipesReporter.java b/tika-core/src/main/java/org/apache/tika/pipes/LoggingPipesReporter.java new file mode 100644 index 000000000..bf7eb45c3 --- /dev/null +++ b/tika-core/src/main/java/org/apache/tika/pipes/LoggingPipesReporter.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tika.pipes; + + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Simple PipesReporter that logs everything at the debug level. + */ +public class LoggingPipesReporter extends PipesReporter { + Logger LOGGER = LoggerFactory.getLogger(LoggingPipesReporter.class); + + @Override + public void report(FetchEmitTuple t, PipesResult result, long elapsed) { + LOGGER.debug("{} {} {}", t, result, elapsed); + } +}