-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix(everything) log.Debug -> log.Debugf #241
Conversation
@@ -70,7 +70,7 @@ func (s *BlockService) GetBlock(ctx context.Context, k u.Key) (*blocks.Block, er | |||
log.Debugf("BlockService GetBlock: '%s'", k) | |||
datai, err := s.Datastore.Get(k.DsKey()) | |||
if err == nil { | |||
log.Debug("Blockservice: Got data in datastore.") | |||
log.Debugf("Blockservice: Got data in datastore.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shouldn't be log.Debugf
. it should just be log.Debug
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f is for fmt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. It's my understanding that Debugf("a string") is functionally equivalent to Debug("string") but not the other wat around.
Ideally, Debug isn't even in the interface so we guard against programmer error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not equivalent. This works:
log.Debug("a", "b", 1123) // a b 1123
Turning that into a log.Debugf
will break it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. Okay. I'll reset --soft and run through this with a fine toothed comb and ping.
revised @jbenet |
LGTM |
fix(everything) log.Debug -> log.Debugf
fix(everything) log.Debug -> log.Debugf
Fix races with DialQueue variables
@whyrusleeping @jbenet