Page MenuHomePhabricator

Add last missing part from PR12954
ClosedPublic

Authored by nakihito on Jan 22 2020, 20:56.

Details

Reviewers
deadalnix
Fabien
jasonbcox
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rSTAGINGa5b58641cce4: Add last missing part from PR12954
rABCa5b58641cce4: Add last missing part from PR12954
Summary

Pull request description:

This is purely a refactor with no behavior changes.

This creates a new class `BCLog::Logger` to encapsulate all global logging configuration and state.

Tree-SHA512: b34811f54a53b7375d7b6f84925453c6f2419d21179379ee28b3843d0f4ff8e22020de84a5e783453ea927e9074e32de8ecd05a6fa50d7bb05502001aaed8e53

Partial backport of Core PR12954
https://github.com/bitcoin/bitcoin/pull/12954/files#diff-d278fc7d6997679f1f7416c5eda758fcR92
https://github.com/bitcoin/bitcoin/pull/12954/files#diff-d278fc7d6997679f1f7416c5eda758fcR147

Most of the changes were already made in various patches over time (see D4531 and D5010 for examples). This is only adding the last missing Enabled() function which will reducing our code ownership and make future backports easier.

Test Plan
make check
./bitcoind -printtoconsole=0 -debuglogfile=0

Perform some RPC calls and verify no log information is printed.

./bitcoind

Verify logging information is printed to console.

./bitcoind -printtoconsole=0

Verify logging information is printed to the default debug.log file.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
PR12954
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 9109
Build 16179: Default Diff Build & Tests
Build 16178: arc lint + arc unit

Event Timeline

Owners added a reviewer: Restricted Owners Package.Jan 22 2020, 20:56

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those Bitcoin Core PRs have been inserted into the summary for reference.

This revision is now accepted and ready to land.Jan 23 2020, 00:11