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

Jeff Zemerick commented on OPENNLP-675:
---------------------------------------

This issue been here awhile but I think it will still be useful so I am 
submitting a pull request that introduces log4j2. Outside of the CLI code, 
print calls to System.out and System.err were replaced with log4j statements. 
Any calls inside a main() or in a function directly called from a main() I did 
not change (on purpose anyway). I tried to be consistent with the log4j levels 
based on what's being logged, e.g. if the line said "Doing something" I made it 
a trace(), if it was informational it became info(), if it was in between it 
became debug(), if it was an error but did not stop execution it became a 
warn(). I'm open to suggestions if there's some that the community thinks 
should be a different level or any other aspect of the pull request. I don't 
think this will interfere with the larger goal of having an API to capture log 
events produced by a trainer.

> Absence of logging and usage of System.out
> ------------------------------------------
>
>                 Key: OPENNLP-675
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-675
>             Project: OpenNLP
>          Issue Type: New Feature
>          Components: Sentence Detector, Tokenizer
>            Reporter: Eugene Prystupa
>
> There seems to be no concept of logging used by the libraries. Instead 
> System.out.println is hard-coded in many places where debug information using 
> a logging framework would do it.
> This makes awkward to use the modules integrated into a different application 
> (as it spams our logs or console). 
> Is the usage of System.out in core classes (like GISTrainer) by choice? Or is 
> it simply a technical debt? I am happy to work on it and provide a patch if 
> this is a technical debt.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to