diff --git a/contrib/electrs.service b/contrib/electrs.service index 697aa10bf..a41062097 100644 --- a/contrib/electrs.service +++ b/contrib/electrs.service @@ -3,7 +3,7 @@ Description=Electrum Rust Server [Service] Type=simple -ExecStart=/path/to/electrs/target/release/electrs -vv --db-dir /path/to/electrs/db/ +ExecStart=/path/to/electrs/target/release/electrs --log-filters INFO --db-dir /path/to/electrs/db/ Restart=on-failure RestartSec=60 Environment="RUST_BACKTRACE=1" diff --git a/doc/config.md b/doc/config.md index 532e5f64a..cc9599f01 100644 --- a/doc/config.md +++ b/doc/config.md @@ -55,7 +55,7 @@ For each command line argument an **environment variable** of the same name with Similarly, for each such argument an option in config file exists with underscores instead of hypens (e.g. `electrum_rpc_addr`). -You need to use a number in config file if you want to increase verbosity (e.g. `verbose = 3` is equivalent to `-vvv`) and `true` value in case of flags (e.g. `timestamp = true`) +You need to use `true` value in case of flags (e.g. `timestamp = true`). **Authentication** @@ -162,7 +162,7 @@ After=bitcoind.service [Service] WorkingDirectory=/home/bitcoin/electrs -ExecStart=/home/bitcoin/electrs/target/release/electrs -vv --db-dir ./db --electrum-rpc-addr="127.0.0.1:50001" +ExecStart=/home/bitcoin/electrs/target/release/electrs --log-filters INFO --db-dir ./db --electrum-rpc-addr="127.0.0.1:50001" User=bitcoin Group=bitcoin Type=simple diff --git a/doc/config_example.toml b/doc/config_example.toml index 55aa7a17c..1272ddbb9 100644 --- a/doc/config_example.toml +++ b/doc/config_example.toml @@ -28,5 +28,4 @@ network = "bitcoin" electrum_rpc_addr = "127.0.0.1:50001" # How much information about internal workings should electrs print. Increase before reporting a bug. -verbose = 2 - +log_filters = "INFO" diff --git a/doc/upgrading.md b/doc/upgrading.md index e7b6a91a5..dd572d54a 100644 --- a/doc/upgrading.md +++ b/doc/upgrading.md @@ -2,6 +2,16 @@ * If you use `verbose` (or `-v` argument), switch to `log_filters` (or `RUST_LOG` environment variable). Please note that it allows to set per-module filters, but module naming is considered unstable. + If you have used `-vv` (the value suggested in the documentation), switch to `--log-filters INFO`: + + +|Log filter|Old `verbose` value|Description | +|----------|-------------------|----------------------------------------------------------------------| +|ERROR | 0|Only fatal errors | +|WARN | 1|Things that could indicate serious problems | +|INFO | 2|Various significant events and suggestions | +|DEBUG | 3|Details that could be useful when debugging - only use when debugging!| +|TRACE | 4|**Very** detailed information - only use when debugging! | ### Important changes from versions older than 0.9.0 diff --git a/doc/usage.md b/doc/usage.md index 00ff896dc..55b5d566f 100644 --- a/doc/usage.md +++ b/doc/usage.md @@ -5,7 +5,7 @@ First index sync should take ~4 hours for ~336GB @ August 2021 (on a dual core I $ du -ch ~/.bitcoin/blocks/blk*.dat | tail -n1 336G total -$ ./target/release/electrs -vv --timestamp --db-dir ./db --electrum-rpc-addr="127.0.0.1:50001" +$ ./target/release/electrs --log-filters INFO --timestamp --db-dir ./db --electrum-rpc-addr="127.0.0.1:50001" Config { network: Bitcoin, db_path: "./db/bitcoin", daemon_dir: "/home/user/.bitcoin", daemon_auth: CookieFile("/home/user/.bitcoin/.cookie"), daemon_rpc_addr: V4(127.0.0.1:8332), daemon_p2p_addr: V4(127.0.0.1:8333), electrum_rpc_addr: V4(127.0.0.1:50001), monitoring_addr: V4(127.0.0.1:4224), wait_duration: 10s, index_batch_size: 10, index_lookup_limit: 100, ignore_mempool: false, server_banner: "Welcome to electrs 0.9.0 (Electrum Rust Server)!", args: [] } [2021-08-17T18:48:40.054Z INFO electrs::metrics::metrics_impl] serving Prometheus metrics on 127.0.0.1:4224 [2021-08-17T18:48:40.944Z INFO electrs::db] "./db/bitcoin": 0 SST files, 0 GB, 0 Grows