Skip to content
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

[Init] Add -debuglogfile option #1455

Merged

Conversation

random-zebra
Copy link

@random-zebra random-zebra commented Mar 24, 2020

Implemented on top of

Only last 4 commits are relevant to this PR.
Backports bitcoin#11781

This patch adds an option to configure the name and/or directory of the debug log file.


The user can specify either a relative path, in which case the path is relative to the (network specific) data directory. They can also specify an absolute path to put the log anywhere else in the file system.

Functional test included.

@random-zebra random-zebra added this to the 4.1.0 milestone Mar 24, 2020
@random-zebra random-zebra self-assigned this Mar 24, 2020
@random-zebra random-zebra force-pushed the 2020_debugfile_option branch from d4671d6 to 179002c Compare March 24, 2020 15:13
@random-zebra random-zebra force-pushed the 2020_debugfile_option branch 2 times, most recently from 087cf14 to 7f3b3df Compare April 6, 2020 02:21
This patch adds an option to configure the name and/or directory of the
debug log.

The user can specify either a relative path, in which case the path
is relative to the data directory. They can also specify an absolute
path to put the log anywhere else in the file system.

backports bitcoin/bitcoin@cf5f432
@random-zebra random-zebra force-pushed the 2020_debugfile_option branch from 7f3b3df to 882ef90 Compare April 6, 2020 04:42
@random-zebra
Copy link
Author

#1451 is merged. This one is the next.

@Fuzzbawls
Copy link
Collaborator

since util.cpp is now moving the fs namespace alias outside of individual functions and applying it to the whole file, shouldn't we replace every instance of boost::filesystem::<x> with fs::<x>?

I know that is not really relevant to the intention of this PR, but rather a consistency thing.

@random-zebra
Copy link
Author

random-zebra commented Apr 7, 2020

Yes. The plan is to move the namespace to its own fs.h/fs.cpp as per upstream.
It will be refactored in a successive PR.

@Fuzzbawls
Copy link
Collaborator

ok, thought as much.

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 882ef90

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 882ef90

@random-zebra random-zebra merged commit b26dbc4 into PIVX-Project:master Apr 9, 2020
Fuzzbawls added a commit that referenced this pull request Apr 14, 2020
5c8e968 [Trivial] Document logtimemicros flag in the help (random-zebra)
4daa10a util: Store debug log file path in BCLog::Logger member. (random-zebra)
2f03e85 scripted-diff: Rename BCLog::Logger member variables. (random-zebra)
303700e util: Refactor GetLogCategory. (random-zebra)
0ae18c0 util: Encapsulate logCategories within BCLog::Logger. (random-zebra)
a2fb3fd util: Move debug file management functions into Logger. (random-zebra)
5a42d82 util: Establish global logger object. (random-zebra)
15c0da4 [Refactor] Complete boost::filesystem namespace in util (random-zebra)
81ddbf4 MOVEONLY: Move logging code from util.{h,cpp} to new files. (random-zebra)

Pull request description:

  Implemented on top of:
  - [x] #1449
  - [x] #1437
  - [x] #1439
  - [x] #1450
  - [x] #1451
  - [x] #1455

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

  Adapted from
  - bitcoin#13021
  - bitcoin#12954

ACKs for top commit:
  Fuzzbawls:
    ACK 5c8e968
  furszy:
    utACK 5c8e968

Tree-SHA512: 0b10a031dd7e32b48485236fbdd8249d011049e6f99e1df145b7dea4cab9e6e67e19d1bb13ff48e99eb2487a8399bbb8298fe851ad8873416fc1053aee0379bc
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