Skip to content

Commit

Permalink
Fixup --log-filters documentation and examples
Browse files Browse the repository at this point in the history
Drop `-v` and `--verbose` mentions.
  • Loading branch information
romanz committed Nov 12, 2021
1 parent 64bc7e1 commit a90871a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion contrib/electrs.service
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions doc/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**

Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions doc/config_example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
10 changes: 10 additions & 0 deletions doc/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a90871a

Please sign in to comment.