Skip to content
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

Merged
merged 1 commit into from
Oct 31, 2014
Merged

fix(everything) log.Debug -> log.Debugf #241

merged 1 commit into from
Oct 31, 2014

Conversation

btc
Copy link
Contributor

@btc btc commented Oct 30, 2014

gofmt -r 'log.Debug -> log.Debugf' -w .

@whyrusleeping @jbenet

@btc btc added the status/in-progress In progress label Oct 30, 2014
@@ -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.")
Copy link
Member

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 ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f is for fmt

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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.

@btc
Copy link
Contributor Author

btc commented Oct 30, 2014

revised @jbenet

@jbenet
Copy link
Member

jbenet commented Oct 31, 2014

LGTM

jbenet added a commit that referenced this pull request Oct 31, 2014
fix(everything) log.Debug -> log.Debugf
@jbenet jbenet merged commit 01a583e into master Oct 31, 2014
@jbenet jbenet removed the status/in-progress In progress label Oct 31, 2014
@jbenet jbenet deleted the fix/log-debugf branch October 31, 2014 00:09
@aschmahmann aschmahmann mentioned this pull request May 14, 2021
71 tasks
ariescodescream pushed a commit to ariescodescream/go-ipfs that referenced this pull request Oct 23, 2021
fix(everything) log.Debug -> log.Debugf
ariescodescream pushed a commit to ariescodescream/go-ipfs that referenced this pull request Oct 23, 2021
Fix races with DialQueue variables
@aschmahmann aschmahmann mentioned this pull request Dec 1, 2021
80 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants