Hi,

any other opinions about it? :-)
 
My personal view would also to switch to SLF4J (Option C), so OpenNLP
can be easiliy integrated and logging just works out of the box
(instead of relying on System.out calls). 

JUL is a bit of a pain to configure, but works, if it is done
correctly. That would be my second choice, if we want to stick at the
"minimal deps" credo.

Side note: We even have some (evil) call to System.setOut(...) in
OpenNLP, which likely interfer if OpenNLP is used as a library (and
which isn't something exepected from a user point of view). We can
maintain the principle of "minimal deps", if we only ship a logging
implementation + config in the dist package. All other locations can
either be "test" or "optional=true". We just need to document, that
integrators need to provide a logging implementation + ensure, that CLI
users doesn't notice the switch.

Gruß
Richard (the other one ;-) )

Am Mittwoch, dem 21.12.2022 um 08:03 +0100 schrieb Richard Eckart de
Castilho:
> Hi,
> 
> > On 19. Dec 2022, at 20:46, Jeff Zemerick <[email protected]>
> > wrote:
> > 
> > For C, having minimal dependencies is a good idea in general but I
> > think it
> > gets to a point where it can be hard when you want your library to
> > play
> > well with others. I don't think I would object to an SLF4J
> > dependency if
> > the community wants to go in that direction.
> 
> for history reasons, Apache UIMA has its own logging API which in
> newer versions incorporates the SLF4J API ... but the UIMA logging
> API still first talks to its own delegation layer which then can
> delegate to SLF4J or talk directly to Log4J or other implementations.
> 
> As I said: this is a historic thing. But having had to fix bugs in
> the delegation layer, I can tell you that it is not a fun thing at
> all to have to maintain that delegation layer. In the latest round of
> fixes I even had to resort to using reflection to access methods that
> Log4J chose to no longer make public in its latest release to ensure
> the delegation layer still works. Yuck!
> 
> +1 for option C: just use the SLF4J API directly.
> 
> Cheers,
> 
> -- Richard (from Apache UIMA)
> 

Reply via email to