add logging functionality for aligning key value pairs after message (#461)

* add logging functionality for aligning key value pairs after the main messages

* move to own crate, change default message width to 40

* use FullFormat in validator_client (CompactFormat is not compatible with aligning)

* move logging to eth2/utils/logging
This commit is contained in:
blacktemplar
2019-07-31 09:06:53 +10:00
committed by Paul Hauner
parent 6eac426ed8
commit 309b10c4a8
7 changed files with 137 additions and 1 deletions
+1
View File
@@ -21,3 +21,4 @@ futures = "0.1.25"
exit-future = "0.1.3"
env_logger = "0.6.1"
dirs = "2.0.1"
logging = { path = "../eth2/utils/logging" }
+1
View File
@@ -173,6 +173,7 @@ fn main() {
// build the initial logger
let decorator = slog_term::TermDecorator::new().build();
let decorator = logging::AlignedTermDecorator::new(decorator, logging::MAX_MESSAGE_WIDTH);
let drain = slog_term::FullFormat::new(decorator).build().fuse();
let drain = slog_async::Async::new(drain).build();