Skip to content

Conversation

@tulip0
Copy link

@tulip0 tulip0 commented Nov 22, 2015

On every peer connection Bitcoin Core prints timestamp offset information to the main log, this adds noise and has little utility. This patch moves it to the "net" debug category instead.

@tulip0 tulip0 changed the title Move time data log print to 'net' category to reduce noise [Trivial] Move time data log print to 'net' category to reduce noise Nov 22, 2015
@gmaxwell
Copy link
Contributor

utACK

Copy link
Member

Choose a reason for hiding this comment

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

Will this look weird when we decide to auto print the category?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it'll need fixing if that change is made in the future.
Does anybody run in the non-specific -debug mode that would require this?

2015-11-23 08:06:14 Added time data, samples 5, offset -1 (+0 minutes)
2015-11-23 08:06:14 -1  -1  -1  +0  +0  |  nTimeOffset = -1  (+0 minutes)

Maybe that second print can go away entirely? The utility for debugging seems low.

Copy link
Member

Choose a reason for hiding this comment

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

Will this look weird when we decide to auto print the category?

Not if we stick with a strict format, and only print the category name on new lines along with the time.
Outputting something using multiple PrintX calls has always been possible, and should still be possible after that (currently purely theoretical) change.

@laanwj
Copy link
Member

laanwj commented Nov 24, 2015

Good idea, utACK

@laanwj laanwj merged commit 4846543 into bitcoin:master Nov 24, 2015
laanwj added a commit that referenced this pull request Nov 24, 2015
4846543 Move time data log print to 'net' category to reduce log noise (tulip)
@tulip0 tulip0 deleted the no-time-offset-logging branch November 29, 2015 10:11
zkbot added a commit to zcash/zcash that referenced this pull request Feb 19, 2021
Bitcoin 0.12 misc P2P/Net PRs

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#5288
  - Only the reorg, option was removed in bitcoin/bitcoin#6374 which we merged in #1258
- bitcoin/bitcoin#6561
- bitcoin/bitcoin#6728
- bitcoin/bitcoin#6829
- bitcoin/bitcoin#6974
- bitcoin/bitcoin#7075
- bitcoin/bitcoin#7166

Part of #2074.
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants