forked from dashpay/dash
-
Notifications
You must be signed in to change notification settings - Fork 720
[Util] Refactor logging code into a global object #1459
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
Merged
Fuzzbawls
merged 9 commits into
PIVX-Project:master
from
random-zebra:202003_logging_refactor
Apr 14, 2020
Merged
[Util] Refactor logging code into a global object #1459
Fuzzbawls
merged 9 commits into
PIVX-Project:master
from
random-zebra:202003_logging_refactor
Apr 14, 2020
Conversation
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
1 task
a4e82b8
to
7e0eed0
Compare
7e0eed0
to
3ac4365
Compare
Last one in the chain of logging/debug backports. Rebased. |
The object encapsulates logging configuration, and in a later commit, set up routines will also be moved into the class. backports bitcoin/bitcoin@f55f4fc
Changing parameter types from pointers to references and uint32_t to BCLog::LogFlags simplifies calling code. backports bitcoin/bitcoin@1eac317
-BEGIN VERIFY SCRIPT- sed -i "s/fileout/m_fileout/" src/logging.h src/logging.cpp sed -i "s/mutexDebugLog/m_file_mutex/" src/logging.h src/logging.cpp sed -i "s/vMsgsBeforeOpenLog/m_msgs_before_open/" src/logging.h src/logging.cpp sed -i "s/logCategories/m_categories/" src/logging.h src/logging.cpp sed -i "s/fPrintToConsole/m_print_to_console/" src/logging.h src/logging.cpp src/init.cpp sed -i "s/fPrintToDebugLog/m_print_to_file/" src/logging.h src/logging.cpp src/init.cpp src/test/test_pivx.cpp sed -i "s/fLogTimestamps/m_log_timestamps/" src/logging.h src/logging.cpp src/init.cpp sed -i "s/fLogTimeMicros/m_log_time_micros/" src/logging.h src/logging.cpp src/init.cpp sed -i "s/fReopenDebugLog/m_reopen_file/" src/logging.h src/logging.cpp src/init.cpp sed -i "s/fStartedNewLine/m_started_new_line/" src/logging.h src/logging.cpp -END VERIFY SCRIPT- backports bitcoin/bitcoin@8e7b961
This breaks the cyclic between logging and util. Backports bitcoin/bitcoin@8c2d695
a4ce094
to
5c8e968
Compare
Fuzzbawls
approved these changes
Apr 13, 2020
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.
ACK 5c8e968
furszy
approved these changes
Apr 14, 2020
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.
utACK 5c8e968
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implemented on top of:
-debuglogfile
option #1455This creates a new class BCLog::Logger to encapsulate all global logging configuration and state.
Adapted from