Skip to content

Suppress logs from forge inspect#77

Merged
stiefn merged 1 commit intomainfrom
no-logs-forge-inspect2
Jul 4, 2025
Merged

Suppress logs from forge inspect#77
stiefn merged 1 commit intomainfrom
no-logs-forge-inspect2

Conversation

@GiovanniTorrisi-ChainSecurity
Copy link
Collaborator

@GiovanniTorrisi-ChainSecurity GiovanniTorrisi-ChainSecurity commented Jun 12, 2025

Steps to reproduce:

Have RUST_LOG="debug" in your environment.
Try to initialise a DVF.

Result:

thread 'main' panicked at lib/state/forge_inspect.rs:203:55:
called Result::unwrap() on an Err value: Error("expected value", line: 1, column: 1)

Reason:

When RUST_LOG="debug" the forge inspect outputs its logs in the stdout, together with the JSON string requested. The result is that the storage layout JSON string contains output logs and cannot be parsed into an object.

Solution:

Run forge inspect with RUST_LOG="error". We expect forge inspect to only output the JSON result in the stdout or an error, not logs.

@stiefn stiefn force-pushed the no-logs-forge-inspect2 branch from 1a17cbf to 15e3d2b Compare July 3, 2025 12:59
@stiefn stiefn merged commit 72ecbb4 into main Jul 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants