Allow debug logs to be excluded from specified component#10123
Merged
laanwj merged 1 commit intobitcoin:masterfrom Apr 3, 2017
Merged
Allow debug logs to be excluded from specified component#10123laanwj merged 1 commit intobitcoin:masterfrom
laanwj merged 1 commit intobitcoin:masterfrom
Conversation
Contributor
|
utACK 3f1cbd38896cea8cea3095aad0a23254a39f651e |
Contributor
|
utACK 3f1cbd3. Might be good to clean the category code up in another PR. |
Contributor
Author
|
@JeremyRubin agree - this could be optimized so we don't do a |
Contributor
Author
|
Closing until #9424 is merged. |
Member
|
#9424 was merged |
Contributor
Author
laanwj
reviewed
Apr 3, 2017
src/init.cpp
Outdated
Member
There was a problem hiding this comment.
To not give the translators extra work, please try to use the same translation message as below. You could add a %s for the option.
Contributor
Author
There was a problem hiding this comment.
Good point. Changed.
Member
|
utACK 39a70f2 apart from message nit. |
Contributor
Author
|
@laanwj's nit fixed and squashed. |
laanwj
added a commit
that referenced
this pull request
Apr 3, 2017
3bde556 Add -debugexclude option to switch off logging for specified components (John Newbery) Tree-SHA512: 30202e3f2085fc2fc5dd4bedb92988f4cb162c612a42cf8f6395a7da326f34975ddc347f82bc4ddca6c84c438dc0cc6e87869f90c7ff88105dbeaa52a947fa43
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
May 21, 2019
…omponent 3bde556 Add -debugexclude option to switch off logging for specified components (John Newbery) Tree-SHA512: 30202e3f2085fc2fc5dd4bedb92988f4cb162c612a42cf8f6395a7da326f34975ddc347f82bc4ddca6c84c438dc0cc6e87869f90c7ff88105dbeaa52a947fa43
UdjinM6
pushed a commit
to dashpay/dash
that referenced
this pull request
May 22, 2019
* Contains dashification. disables `-debug dash` Merge bitcoin#9424: Change LogAcceptCategory to use uint32_t rather than sets of strings. 6b3bb3d Change LogAcceptCategory to use uint32_t rather than sets of strings. (Gregory Maxwell) Tree-SHA512: ebb5bcf9a7d00a32dd1390b727ff4d29330a038423611da01268d8e1d2c0229e52a1098e751d4e6db73ef4ae862e1e96d38249883fcaf12b68f55ebb01035b34 Signed-off-by: Pasta <[email protected]> 31 -> 32 Signed-off-by: Pasta <[email protected]> * Merge bitcoin#10123: Allow debug logs to be excluded from specified component 3bde556 Add -debugexclude option to switch off logging for specified components (John Newbery) Tree-SHA512: 30202e3f2085fc2fc5dd4bedb92988f4cb162c612a42cf8f6395a7da326f34975ddc347f82bc4ddca6c84c438dc0cc6e87869f90c7ff88105dbeaa52a947fa43 * bump to uint64_t due to added Dash codes Signed-off-by: Pasta <[email protected]> * bump to uint64_t due to added Dash codes cont. Signed-off-by: Pasta <[email protected]> * string -> BCLog format Signed-off-by: Pasta <[email protected]> * uint32_t -> uint64_t Signed-off-by: Pasta <[email protected]> * Fix CBatchedLogger * Fix most fDebug-s * Fix `debug` rpc * Fix BENCH and RAND conflicts * Add ALERT and use it * Update LogPrint-s in dash-specific code * Tweak few log categories Specifically: - use PRIVATESEND in `CPrivateSendClientManager::GetRandomNotUsedMasternode()` - use ZMQ in `CZMQPublishRawGovernanceVoteNotifier::NotifyGovernanceVote()` and `CZMQPublishRawGovernanceObjectNotifier::NotifyGovernanceObject()` * Drop no longer used MASTERNODE category * Merge bitcoin#10153: logging: Fix off-by-one for shrinkdebugfile default faab624 logging: Fix off-by-one for shrinkdebugfile (MarcoFalke) Tree-SHA512: d6153e06067906172ff0611af9e585a3ecf0a7d56925b6ad7c12e75aa802441047059b9b6f6c78e79916c3f2abc8f1998bfd2d5b84201ec6421f727c08da3c21 * Shift dash-specific log categories to start from `1ul << 32` to avoid potential future conflicts with bitcoin ones * Fix `dash` category * remove debugCategories Signed-off-by: Pasta <[email protected]> * Prepend "std::" to find call * Check for BCLog::PRIVATESEND instead of logCategories != BCLog::NONE * Use BCLog::MNPAYMENTS category instead of checking for logCategories != BCLog::NONE * Move "End Dash" comment below "ALERT" When adding new entries here, we'll otherwise get confused with ordering and might end up forgetting that adding something Dash specific must continue with the bit after 43.
2 tasks
random-zebra
added a commit
to PIVX-Project/PIVX
that referenced
this pull request
Apr 4, 2020
0a85445 [Core] Add -debugexclude option (random-zebra) Pull request description: Implemented on top of: - [x] #1449 - [x] #1437 Backports bitcoin#10123 > setting `-debug` can lead to very noisy debug.logs with subcomponents filling up the log file. See for example https://travis-ci.org/bitcoin/bitcoin/jobs/216767286 where there are hundreds of libevent debug logs. This commit adds an option to exclude certain components from debug logging. The usage is: ``` pivxd -debug -debugexclude=<component1> -debugexclude=<component2> ... ``` This finally reduces spammy logs in the functional tests debug, due to libevent and leveldb (bitcoin#10124 was already included backporting the test suite). ACKs for top commit: furszy: Code looking good, utACK 0a85445 . Fuzzbawls: ACK 0a85445 Tree-SHA512: 6ccbe275ab11f3e1739ed117e49db0a2e56db345287cddc7cc18fc1131d7800d0f08a7e93005f70cf45ed8e340580f91c3017532bd2ea28fedb5735409ae068b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
setting
-debugcan lead to very noisy debug.logs with subcomponents filling up the log file. See for example https://travis-ci.org/bitcoin/bitcoin/jobs/216767286 where there are hundreds of libevent debug logs.This commit adds an option to exclude certain components from debug logging. The usage is: