docs: update debugging section

This commit is contained in:
Stepan Kuzmin 2021-07-16 13:09:18 +03:00
parent 49942734af
commit 477834bb7c
No known key found for this signature in database
GPG Key ID: 41335DA6EE45C2B6
2 changed files with 11 additions and 3 deletions

View File

@ -575,10 +575,17 @@ cd ./target/release/
Log levels are controlled on a per-module basis, and by default all logging is disabled except for errors. Logging is controlled via the `RUST_LOG` environment variable. The value of this environment variable is a comma-separated list of logging directives. Log levels are controlled on a per-module basis, and by default all logging is disabled except for errors. Logging is controlled via the `RUST_LOG` environment variable. The value of this environment variable is a comma-separated list of logging directives.
This will enable verbose logging for the `actix_web` module and enable debug logging for the `martin` and `postgres` modules: This will enable debug logging for all modules:
```shell ```shell
export RUST_LOG=actix_web=info,martin=debug,postgres=debug export RUST_LOG=debug
martin postgres://postgres@localhost/db
```
While this will only enable verbose logging for the `actix_web` module and enable debug logging for the `martin` and `tokio_postgres` modules:
```shell
export RUST_LOG=actix_web=info,martin=debug,tokio_postgres=debug
martin postgres://postgres@localhost/db martin postgres://postgres@localhost/db
``` ```

View File

@ -9,6 +9,7 @@ services:
environment: environment:
- WATCH_MODE=true - WATCH_MODE=true
- DATABASE_URL=postgres://postgres@db/db - DATABASE_URL=postgres://postgres@db/db
- RUST_LOG=actix_web=info,martin=debug,tokio_postgres=debug
depends_on: depends_on:
- db - db