Print machine logs (debug trace)

This may be made optional with a --verbose flag, but usually the user wants to see all invocations of the Trace command
This commit is contained in:
Niels Mündler 2022-09-06 12:04:17 +02:00 committed by Lucas
parent c88e5df8b1
commit 9b491b3777
1 changed files with 5 additions and 1 deletions

View File

@ -97,7 +97,7 @@ fn main() -> anyhow::Result<()> {
Program::<NamedDeBruijn>::try_from(prog)?
};
let (term, cost, _logs) = program.eval();
let (term, cost, logs) = program.eval();
match term {
Ok(term) => {
@ -121,6 +121,10 @@ fn main() -> anyhow::Result<()> {
"\nBudget\n------\ncpu: {}\nmemory: {}\n",
cost.cpu, cost.mem
);
println!(
"\nLogs\n----\n{}",
logs.join("\n")
)
}
},
}