Page MenuHomePhabricator

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

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

Details

Summary

MOVEONLY: Move logging code from util.{h,cpp} to new files.

Break logging code out of util.{h,cpp} into logging.{h,cpp}. This does not modify anything, just moves code.

Test Plan

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

Diff Detail

Event Timeline

Owners added a reviewer: Restricted Owners Package.Apr 12 2018, 19:03
jimpo retitled this revision from MOVEONLY: Move logging code from util.{h,cpp} to new files. to [Part 1] Refactor logging code into a global object.Apr 12 2018, 19:43
jimpo edited the summary of this revision. (Show Details)
deadalnix requested changes to this revision.Apr 12 2018, 20:07

Few small change, but overall, looks good.

src/logging.cpp
2 ↗(On Diff #3481)
// Copyright (c) 2009-2016 The Bitcoin Core developers

As per the copyright mention in the file it was extracted from.

3 ↗(On Diff #3481)
// Copyright (c) 2017-2018 The Bitcoin developers
src/logging.h
3 ↗(On Diff #3481)

See comment in the cpp file.

src/util.h
63 ↗(On Diff #3481)

Why the change ?

This revision now requires changes to proceed.Apr 12 2018, 20:07
src/util.h
63 ↗(On Diff #3481)

Because LogPrintStr will be moved out of the global scope in a later commit. I will revert the change to this one and update the child diff.

Fix copyright notices and extraneous change to util.h.

Adding logging.cpp to CMakeLists.txt.

This revision is now accepted and ready to land.Apr 12 2018, 22:47
This revision was automatically updated to reflect the committed changes.