mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-29 10:54:24 +00:00
Tracing cleanup (#7168)
#7153 #7146 #7147 #7148 -> Thanks to @ackintosh This PR does the following: 1. Disable logging to file when using either `--logfile-max-number 0` or `--logfile-max-size 0`. Note that disabling the log file in this way will also disable `discv5` and `libp2p` logging. 1. `discv5` and `libp2p` logging will be disabled by default unless running `beacon_node` or `boot_node`. This also should fix the VC panic we were seeing. 1. Removes log rotation and compression from `libp2p` and `discv5` logs. It is now limited to 1 file and will rotate based on the value of the `--logfile-max-size` flag. We could potentially add flags specifically to control the size/number of these, however I felt a single log file was sufficient. Perhaps @AgeManning has opinions about this? 1. Removes all dependency logging and references to `dep_log`. 1. Introduces workspace filtering to file and stdout. This explicitly allows logs from members of the Lighthouse workspace, disallowing all others. It uses a proc macro which pulls the member list from cargo metadata at compile time. This might be over-engineered but my hope is that this list will not require maintenance. 1. Unifies file and stdout JSON format. With slog, the formats were slightly different. @threehrsleep worked to maintain that format difference, to ensure there was no breaking changes. If these format differences are actually problematic we can restore it, however I felt the added complexity wasn't worth it. 1. General code improvements and cleanup.
This commit is contained in:
@@ -51,6 +51,7 @@ members = [
|
||||
"common/unused_port",
|
||||
"common/validator_dir",
|
||||
"common/warp_utils",
|
||||
"common/workspace_members",
|
||||
|
||||
"consensus/fixed_bytes",
|
||||
"consensus/fork_choice",
|
||||
@@ -120,6 +121,7 @@ bincode = "1"
|
||||
bitvec = "1"
|
||||
byteorder = "1"
|
||||
bytes = "1"
|
||||
cargo_metadata = "0.19"
|
||||
clap = { version = "4.5.4", features = ["derive", "cargo", "wrap_help"] }
|
||||
# Turn off c-kzg's default features which include `blst/portable`. We can turn on blst's portable
|
||||
# feature ourselves when desired.
|
||||
@@ -246,6 +248,7 @@ kzg = { path = "crypto/kzg" }
|
||||
metrics = { path = "common/metrics" }
|
||||
lighthouse_network = { path = "beacon_node/lighthouse_network" }
|
||||
lighthouse_version = { path = "common/lighthouse_version" }
|
||||
workspace_members = { path = "common/workspace_members" }
|
||||
lockfile = { path = "common/lockfile" }
|
||||
logging = { path = "common/logging" }
|
||||
lru_cache = { path = "common/lru_cache" }
|
||||
|
||||
Reference in New Issue
Block a user