-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove all global log invocations #31
Conversation
8c6b4b3
to
e8819c0
Compare
@@ -30,15 +30,17 @@ type remoteConnection struct { | |||
remoteTCPAddr string | |||
outbound bool | |||
established bool | |||
logger *log.Logger |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Is putting a Most things have access to Though ironically with my changes in #33 and the changes in here, I think LocalPeer isn't actually doing any logging itself anymore - it only needs a logger in order to feed it into the LocalConnection constructor. |
I elected to make the minimum changes necessary. I am happy to refactor further. May I delete methods like remoteConnection.log, or is that prefix useful/necessary? |
#33 gets rid of remoteConnection.log. |
e8819c0
to
124627b
Compare
@@ -22,7 +24,7 @@ var _ gossipConnection = &mockGossipConnection{} | |||
|
|||
func newTestRouter(name string) *Router { | |||
peerName, _ := PeerNameFromString(name) | |||
router := NewRouter(Config{}, peerName, "nick", nil) | |||
router := NewRouter(Config{}, peerName, "nick", nil, log.New(ioutil.Discard, "", 0)) |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
6832ebe
to
070783b
Compare
It would be easier to integrate this with other schemes if it took an interface rather than a concrete |
Agreed. #37 |
Fixes #21