Skip to content

Commit 2316100

Browse files
authored
add notes on verbosity levels for viewing logs in stdout (#851)
1 parent 05eb664 commit 2316100

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

cli/src/opts/evm.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ pub struct EvmArgs {
7171

7272
#[clap(
7373
help = r#"Verbosity mode of EVM output as number of occurences of the `v` flag (-v, -vv, -vvv, etc.)
74+
2: print test logs for all tests
7475
3: print test trace for failing tests
7576
4: always print test trace, print setup for failing tests
7677
5: always print test trace and setup

forge/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,16 @@ console.log(someValue);
305305
306306
```
307307

308+
Note: to make logs visible in `stdout`, you must use at least level 2 verbosity.
309+
```bash
310+
$> forge test -vv
311+
[PASS] test1() (gas: 7683)
312+
...
313+
Logs:
314+
<your log string or event>
315+
...
316+
```
317+
308318
## Remappings
309319
If you are working in a repo with NPM-style imports, like
310320
```

0 commit comments

Comments
 (0)