Skip to content

Commit

Permalink
rust-snippets: add comment about env_logger and test-log
Browse files Browse the repository at this point in the history
  • Loading branch information
lpenz committed Jul 13, 2024
1 parent 961bf04 commit 468b618
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions articles/rust-snippets/index.md.mako
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,20 @@ crate if you want to use a standard CI that includes
[cargo-semver-checks] like [ghworkflow-rust].


# Tests

To be able to see the traces in tests, the easiest way is to use:

```bash
cargo add --dev env_logger
cargo add --dev test-log
```

`test-log` takes care of initializing the tracing infra in accordance
with the [`RUST_LOG`] environment variable when we use its `test`
macro.


# Errors


Expand Down

0 comments on commit 468b618

Please sign in to comment.