Skip to content

[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
merged 9 commits into from
Apr 14, 2020

Conversation

@random-zebra
Copy link
Author

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
@random-zebra random-zebra force-pushed the 202003_logging_refactor branch from a4ce094 to 5c8e968 Compare April 11, 2020 23:13
Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

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

ACK 5c8e968

Copy link

@furszy furszy left a 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants