brettwooldridge / NuProcess

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

WindowsProcess printStackTrace #63

Closed benor1470 closed 2 years ago

benor1470 commented 8 years ago

Hey, the WindowsProcess uses printStackTrace (lines 173,220,249,303,332,392) and not using logger, can you please use a logger so i can turn in off when they aren't needed? My log shows those errors on tests and without a way to turn them off they fill my log

Thank you

brettwooldridge commented 8 years ago

Pull requests welcomed.

benor1470 commented 8 years ago

Then a pull request was created

fanf commented 7 years ago

I have the same problem with BasePosixProcess. I have two concerns:

To not depend to a given log framework, and idea could be to add a PrinStream to the process builder, and use that one in place of System.err if provided. Users who care would be able to provide a byte array output stream to post process the stream in case of exit code Int.MinValue, and chose what to actually disaply to users using their application logging framework.

Do you think the idea can fly ?

bturner commented 3 years ago

In the years since this was last updated, BasePosixProcess has already been changed to replace e.printStackTrace with use of the JDK's java.util.logging.Logger, and 1.2.x and 2.0.x releases include that change. I've recently opened pull request #118 which applies a similar treatment to WindowsProcess. Hopefully that can be merged/released soon.

bturner commented 2 years ago

My changes from pull request #118 were included in NuProcess 2.0.2, eliminating the last e.printStackTrace calls from the codebase.