brettwooldridge / NuProcess

Low-overhead, non-blocking I/O, external Process implementation for Java
Apache License 2.0
712 stars 84 forks source link

Added usage for slf4j #64

Closed benor1470 closed 7 years ago

benor1470 commented 8 years ago

Added slf4j as a fix for issue #63

brettwooldridge commented 8 years ago

@bhamiltoncx Does a dependency on slf4j cause Buck any grief? Is java.util.logging better (no external dependency), allowing users to use jul-to-slf4j.jar if they so choose?

benor1470 commented 8 years ago

SLF4J provides much simple and powerful APIs when compared to Java Util Logger and it is a standard

brettwooldridge commented 8 years ago

@benor1470 I understand it is widely used, I use it in many projects. The issue is more of not breaking existing users who may not have a slf4j dependency.

bhamiltoncx commented 8 years ago

Buck doesn't really want slf4j as a dependency. We use java.util.logging with a thin shim (the same as Airlift) and it works fine. On Mon, Jul 4, 2016 at 16:28 Brett Wooldridge notifications@github.com wrote:

@benor1470 https://github.com/benor1470 I understand it is widely used, I use it in many projects. The issue is more of not breaking existing users who may not have a slf4j dependency.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/brettwooldridge/NuProcess/pull/64#issuecomment-230302782, or mute the thread https://github.com/notifications/unsubscribe/AApAU0ghRY4fkDMRAtldcQSJY55dy4Qiks5qSRiHgaJpZM4JD3jK .

benor1470 commented 8 years ago

Then I removed slf4j and used native java

analytically commented 8 years ago

There's always jul-to-slf4j:

The jul-to-slf4j module includes a java.util.logging (jul) handler, namely SLF4JBridgeHandler, which routes all incoming jul records to the SLF4j API.

http://www.slf4j.org/legacy.html

bturner commented 7 years ago

It's nice to see this getting tweaked for WindowsProcess, but shouldn't the same change be made to the printStackTrace calls in BasePosixProcess and ProcessCompletions (which is also in the Windows-specific code) and others? This seems like a pretty incomplete change.

brettwooldridge commented 7 years ago

Static loggers in a library is an anti-pattern.