chia-blockchain
chia-blockchain copied to clipboard
cmds: Implement `chia beta`
This PR introduces the undocumented CLI command chia beta
with the following possible commands:
-
chia beta enable
to enable the beta test mode (this will put thebeta
section with the new log root path into the config. The default is the home directory, should be work for linux/mac/windows but i only tested on mac so far.) -
chia beta disable
to disable the beta test mode (drops thebeta
section) -
chia beta prepare_submission
to pre-process and zip the logfiles
Enabling the beta test mode has the following impact:
beta:
path: <the path choosen in `chia beta enable`>
will be added to the config which then leads to a different logging initialisation on the start of the daemon or any service. The logging root path will be set to the value of the config entry beta.path
and the actual logging config used looks like below:
def get_beta_logging_config() -> Dict[str, Any]:
return {
"log_filename": f"{chia_full_version_str()}/chia-blockchain/beta.log",
"log_level": "DEBUG",
"log_stdout": False,
"log_maxfilesrotation": 100,
"log_maxbytesrotation": 50 * 1024 * 1024,
"log_use_gzip": True,
}
-
chia_full_version_str()
translates for example to1.4.0
-
log_maxfilesrotation
is bumped to 100 here to make sure we don't miss something which though means that we will potentially end up with ~5GiB log data per version so the user should probably clean those up after submission :) We could alternatively drop the files inchia beta prepare_submission
once they are zipped. -
log_use_gzip
is introduced by this PR (set toFalse
by default) and set toTrue
in beta mode.
Enabling beta test mode also leads to the plotting logs being written to files in the beta.path
directory.
The file structure in beta.path
will look like:
Based on:
- #12366
- #12388
This pull request introduces 12 alerts when merging e7b6d042b3c032935b9279ce0e29b4e78a7a4cf4 into 81b8dc45b51300537ff0bbbd5f8edcef80c10e38 - view on LGTM.com
new alerts:
- 10 for Module-level cyclic import
- 2 for Unnecessary pass
This pull request introduces 12 alerts when merging 3658ed39aaa280f9431fae0e75f696e4c8114dff into 81b8dc45b51300537ff0bbbd5f8edcef80c10e38 - view on LGTM.com
new alerts:
- 12 for Module-level cyclic import
This pull request introduces 9 alerts when merging 0aa2c1707c30882c3d87ba4b3a471e4c0ed958a5 into 81b8dc45b51300537ff0bbbd5f8edcef80c10e38 - view on LGTM.com
new alerts:
- 9 for Module-level cyclic import
This pull request introduces 31 alerts and fixes 1 when merging 24ad742df8a52103c188126fa5ee13e063087a5e into 81b8dc45b51300537ff0bbbd5f8edcef80c10e38 - view on LGTM.com
new alerts:
- 31 for Module-level cyclic import
fixed alerts:
- 1 for Module-level cyclic import
This pull request introduces 5 alerts when merging d03d33a9e830e5a8ef9f3ae4112612c5c149b380 into a801260a5e2450318b20fe5cc7edd8e112a5ab7e - view on LGTM.com
new alerts:
- 5 for Module-level cyclic import
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
This pull request introduces 5 alerts when merging 7ba66506545051af26953c60e4d39427398819dc into 03b4bacb5c8c769f5086885f4c3a9c4fbb1fe9d3 - view on LGTM.com
new alerts:
- 5 for Module-level cyclic import
This pull request introduces 5 alerts when merging ec012a5cf797d72c3a60286175c241e3a3c49a49 into 52e0d430c763ad82091b62b93406c203e27ff9f4 - view on LGTM.com
new alerts:
- 5 for Module-level cyclic import
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
This pull request introduces 5 alerts when merging 34cf4d5d045374a93387ccc9278fb393560be996 into 3e996f8be547460eefd17220dd8643d147a169fd - view on LGTM.com
new alerts:
- 5 for Module-level cyclic import
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request introduces 5 alerts when merging 90929c34b862f73f2e80baff0cbc11a44d70393a into 777ffb2751a6f11a7ad7bcc131c91d3b86e177b5 - view on LGTM.com
new alerts:
- 5 for Module-level cyclic import
Conflicts have been resolved. A maintainer will review the pull request shortly.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
This pull request introduces 5 alerts when merging d5265a9af6c2f49b8d0907abc5883af5554328a9 into 44b2568cd64556009d679d25523041220729324b - view on LGTM.com
new alerts:
- 5 for Module-level cyclic import
This pull request introduces 5 alerts when merging 725ce89277ef167c486344ddcc7fc7c74b044f85 into 8b70466a70388d0fff437d138192ba38faf92be8 - view on LGTM.com
new alerts:
- 5 for Module-level cyclic import
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
This pull request introduces 5 alerts when merging 781c2938e4578b7940cdd81c195de370b195905e into 7c9fb654a3563e69c54848d137859856c8566587 - view on LGTM.com
new alerts:
- 5 for Module-level cyclic import
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
This pull request introduces 5 alerts when merging 3c00858b507a31637ba6a2b3cfcc59e23a20fb8b into d587d99badb9d241b08d0b60cc6329edbf5bbc46 - view on LGTM.com
new alerts:
- 5 for Module-level cyclic import
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
This pull request introduces 5 alerts when merging cf72377c011a4fd81f73b0701ce7309db230c30b into 7afbe266d2647a313bc6ab300b10110b98e616df - view on LGTM.com
new alerts:
- 5 for Module-level cyclic import
lgtm other then the comment on beta enabled/disabled vs in config not in config
i dont understand the benefit of multiple loggers, they would output the same thing if i understand what @altendky is suggesting and seems like this will require more code to support this feature
lgtm other then the comment on beta enabled/disabled vs in config not in config
Im currently working on some refactoring of the code for the enabled/disabled fun.
i dont understand the benefit of multiple loggers, they would output the same thing if i understand what @altendky is suggesting and seems like this will require more code to support this feature
One reason i can think about to keep the standard logging going is for example if people use tools like chiadog where the logs are parsed to monitor the status of the farm it would need to change that config too when beta mode is enabled.. so, i will also take a look at that after the config stuff :)
Also it's not necessarily the same since the beta logging will force DEBUG
log level and most people are on WARNING
or INFO
i guess.