Skip to content

Commit 4db999b

Browse files
feat(cli): add --verbose mode (#1994)
closes INT-4790 usage: ``` cargo openvm --verbose keygen cargo openvm --verbose prove app ```
1 parent 74a0760 commit 4db999b

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ lto = "thin"
112112

113113
[workspace.dependencies]
114114
# Stark Backend
115-
openvm-stark-backend = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.2.0-rc.1", default-features = false }
116-
openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.2.0-rc.1", default-features = false }
115+
openvm-stark-backend = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.2.0-rc.2", default-features = false }
116+
openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.2.0-rc.2", default-features = false }
117117

118118
# OpenVM
119119
openvm-sdk = { path = "crates/sdk", default-features = false }

crates/cli/src/bin/cargo-openvm.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ pub enum Cargo {
1212
}
1313

1414
#[derive(clap::Args)]
15-
#[command(author, about, long_about = None, args_conflicts_with_subcommands = true, version = OPENVM_VERSION_MESSAGE)]
15+
#[command(author, about, long_about = None, version = OPENVM_VERSION_MESSAGE)]
1616
pub struct VmCli {
1717
#[command(subcommand)]
1818
pub command: VmCliCommands,
19+
20+
#[arg(long)]
21+
pub verbose: bool,
1922
}
2023

2124
#[derive(Subcommand)]
@@ -36,7 +39,13 @@ pub enum VmCliCommands {
3639
async fn main() -> Result<()> {
3740
let Cargo::OpenVm(args) = Cargo::parse();
3841
let command = args.command;
39-
setup_tracing_with_log_level(Level::INFO);
42+
let log_level = if args.verbose {
43+
Level::INFO
44+
} else {
45+
Level::WARN
46+
};
47+
setup_tracing_with_log_level(log_level);
48+
4049
match command {
4150
VmCliCommands::Build(cmd) => cmd.run(),
4251
VmCliCommands::Commit(cmd) => cmd.run(),

0 commit comments

Comments
 (0)