Page MenuHomePhabricator

[Part 4] Refactor logging code into a global object
ClosedPublic

Authored by jimpo on Apr 12 2018, 19:47.

Details

Summary

util: Encapsulate logCategories within BCLog::Logger.

Test Plan

Run bitcoind with different permutations of:
-logtimestamps, -debug, -printtoconsole, -datadir, -shrinkdebugfile

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a reviewer: Restricted Owners Package.Apr 12 2018, 19:47
jasonbcox requested changes to this revision.Apr 14 2018, 00:27
jasonbcox added inline comments.
src/init.cpp
1390 ↗(On Diff #3485)

To avoid these casts, I think flag should be typed as LogFlags. As a result, GetLogCategory should be modified to take LogFlags instead of uint32_t.

This revision now requires changes to proceed.Apr 14 2018, 00:27
jasonbcox added inline comments.
src/init.cpp
1390 ↗(On Diff #3485)

Noticed that you fixed this in https://reviews.bitcoinabc.org/D1284.

This revision is now accepted and ready to land.Apr 14 2018, 00:30
src/init.cpp
1390 ↗(On Diff #3485)

It still makes the history confusing.

src/init.cpp
1390 ↗(On Diff #3485)

I'm fine with squashing D1284 into this diff you y'all prefer that. I think it's logically separate and better to keep the diffs small, which is why I make there's two diffs right now.

This revision was automatically updated to reflect the committed changes.