-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: logging #2305
feat: logging #2305
Conversation
@@ -36,7 +38,7 @@ impl<N: Network> Package<N> { | |||
let _locator = Locator::<N>::from_str(&format!("{program_id}/{function_name}"))?; | |||
|
|||
#[cfg(feature = "aleo-cli")] | |||
println!("🚀 Running '{}'...\n", _locator.to_string().bold()); | |||
trace!("🚀 Running '{}'...\n", _locator.to_string().bold()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is very wrong. the CLI does not use tracing!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this has major downstream implications for leo
@@ -400,7 +404,8 @@ mod tests { | |||
check_true_sub_false_with_false(Mode::Public, Mode::Private, Mode::Constant, 0, 0, 2, 2); | |||
check_true_sub_false_with_true(Mode::Public, Mode::Private, Mode::Constant, 0, 0, 3, 3); // <- Differs | |||
check_true_sub_true_with_false(Mode::Public, Mode::Private, Mode::Constant, 0, 0, 2, 2); | |||
check_true_sub_true_with_true(Mode::Public, Mode::Private, Mode::Constant, 0, 0, 3, 3); // <- Differs | |||
check_true_sub_true_with_true(Mode::Public, Mode::Private, Mode::Constant, 0, 0, 3, 3); | |||
// <- Differs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
incorrect changes here, please fix, thanks!
@@ -105,21 +106,21 @@ impl<F: PrimeField> LinearCombination<F> { | |||
// Enforce property 2. | |||
// Note: This branch is triggered if ANY term is not (zero or one). | |||
if self.terms.iter().any(|(v, _)| !(v.value().is_zero() || v.value().is_one())) { | |||
eprintln!("Property 2 of the `Boolean` type was violated in {self}"); | |||
warn!("Property 2 of the `Boolean` type was violated in {self}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these warnings are meant to be eprintln
@@ -156,6 +156,9 @@ optional = true | |||
[dependencies.num-traits] | |||
version = "0.2" | |||
|
|||
[dependencies.log] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove usage of log
@howardwu was this closed by accident? |
Using println! for logging is annoying when snarkVM is used as library (like snarkOS).
Draft, to be revisited after mainnet.