[ 
https://issues.apache.org/jira/browse/OPENNLP-1454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17714744#comment-17714744
 ] 

ASF GitHub Bot commented on OPENNLP-1454:
-----------------------------------------

reckart commented on code in PR #101:
URL: https://github.com/apache/opennlp-sandbox/pull/101#discussion_r1173064041


##########
opennlp-similarity/src/test/java/opennlp/tools/textsimilarity/chunker2matcher/ParserChunker2MatcherProcessorTest.java:
##########
@@ -26,12 +26,17 @@
 import opennlp.tools.textsimilarity.ParseTreeChunk;
 import opennlp.tools.textsimilarity.ParseTreeChunkListScorer;
 import opennlp.tools.textsimilarity.TextSimilarityBagOfWords;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 class ParserChunker2MatcherProcessorTest {
+
+  private static final Logger logger =

Review Comment:
   You can use `LoggerFactory.getLogger(MethodHandles.lookup().lookupClass())` 
as a static replacement for `LoggerFactory.getLogger(getClass())`.





> Convert System.out statements to debug logging statements in 
> 'opennlp-similarity' sandbox component
> ---------------------------------------------------------------------------------------------------
>
>                 Key: OPENNLP-1454
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-1454
>             Project: OpenNLP
>          Issue Type: Task
>          Components: Similarity
>    Affects Versions: 2.1.0
>            Reporter: Martin Wiesner
>            Assignee: Martin Wiesner
>            Priority: Minor
>
> In several classes of the 'opennlp-similarity' sandbox component, commented 
> System.out statements exist that have a debug statement flavor. Yet, in tests 
> and at runtime those spam the console quite heavily. That's why those have 
> been commented out during the compatibility migration towards tools version 
> 2.1.x conducted for all sandbox components.
> The aim of that issue is to convert those spammy log behavior by making use 
> of the slf4j-api. The code contains the spots marked with a TODO notice and 
> this issue number for which a switch to a logging framework with "trace" or 
> "debug" levels could be considered.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to