cloudfoundry / socks5-proxy

This is a go library for starting a socks5 proxy server via SSH
https://cloudfoundry.org
Apache License 2.0
52 stars 21 forks source link

Option to Set Logger #3

Closed drich10 closed 6 years ago

drich10 commented 6 years ago

Hi there!

People we running into an issue where this proxy was printing to stdout breaking the JSON parsing for concourse. A temporary fix has been made which disables the logging. Would y'all be open to a PR allowing users of the library to set the Logger? Just wanted to see what y'all prefer.

cf-gitbot commented 6 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/154364954

The labels on this github issue will be updated when the story is started.

genevieve commented 6 years ago

We are open to a PR. Thanks @drich10!

genevieve commented 6 years ago

This is where the logger would need to go: https://github.com/cloudfoundry/socks5-proxy/blob/master/socks5_proxy.go#L84-L88

The go-socks5 library that this library is using only accepts a logger of type log.Logger.

We have opened an issue to make this an interface so that we can control the output a little better here: https://github.com/armon/go-socks5/pull/21