Skip to content

Commit 26ccdbd

Browse files
update_logs_in_stwo_run_and_prove
1 parent 97fb983 commit 26ccdbd

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.github/workflows/upload_artifacts_workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Upload-Artifacts
33
on:
44
push:
55
branches:
6-
- main
6+
- nitsan/update_logs_in_stwo_run_and_prove
77

88
jobs:
99
artifacts-push:

crates/stwo_run_and_prove/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ cairo-vm.workspace = true
88
clap.workspace = true
99
thiserror.workspace = true
1010
cairo-program-runner-lib.workspace = true
11+
log.workspace = true
1112
stwo-cairo-adapter.workspace = true
1213
stwo_cairo_prover.workspace = true
1314
stwo_cairo_utils.workspace = true

crates/stwo_run_and_prove/src/main.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use stwo_cairo_prover::stwo::prover::backend::simd::SimdBackend;
3434
use stwo_cairo_serialize::CairoSerialize;
3535
use stwo_cairo_utils::file_utils::{IoErrorWithPath, create_file, read_to_string};
3636
use thiserror::Error;
37-
use tracing::{error, info, warn};
37+
use tracing::{Level, error, info, span, warn};
3838

3939
static PROOF_PREFIX: &str = "proof_";
4040
static SUCCESS_SUFFIX: &str = "_success";
@@ -175,6 +175,9 @@ struct ProveConfig {
175175
}
176176

177177
fn main() -> Result<(), StwoRunAndProveError> {
178+
let _span = span!(Level::INFO, "stwo run and prove").entered();
179+
log::info!("log::info!"); // TODO: remove
180+
info!("info!"); // TODO: remove
178181
let args = match Args::try_parse_from(env::args()) {
179182
Ok(args) => args,
180183
Err(err) => err.exit(),
@@ -227,7 +230,7 @@ fn stwo_run_and_prove(
227230
.map_err(|e| StwoRunAndProveError::from((e, program_path)))?;
228231
let program_input = get_program_input(&program_input)
229232
.map_err(|e| StwoRunAndProveError::from((e, program_input.unwrap_or_default())))?;
230-
info!("Running cairo run program.");
233+
log::info!("Running cairo run program.");
231234
let runner = cairo_run_program(&program, program_input, cairo_run_config)?;
232235
info!("Adapting prover input.");
233236
let prover_input = adapter(&runner);

0 commit comments

Comments
 (0)