You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
Currently Directive::Log exclusively works with println statements. We directly write the information inside of LogInfo to std output. This is not ideal as there are multiple ways that someone way want to access logging information in their Noir circuit (writing to file, log traces in memory, etc.).
The current design also requires us to pass down a flag during acir gen for determining whether to print logs during tests. More details can be found in this PR (noir-lang/noir#630).
Solution
Having Directive::Log collect logs into a vector that is returned from the PWG would be the ideal solution. This would then enable whomever is calling backend.solve to handle the logs as they see fit. Such as printing to std out, writing to file, or accessing a vector of logs in memory.
Alternatives considered
There are not many alternatives if we want to enable devs to access the PWG logs in memory. Also it is a superior design to have whomever is calling backend.solve decide how to handle the system logs (nargo, JS packages).
Additional context
Relevant feature requested in Noir that requires this change: noir-lang/noir#688
The text was updated successfully, but these errors were encountered:
Problem
Currently
Directive::Log
exclusively works with println statements. We directly write the information inside ofLogInfo
to std output. This is not ideal as there are multiple ways that someone way want to access logging information in their Noir circuit (writing to file, log traces in memory, etc.).The current design also requires us to pass down a flag during acir gen for determining whether to print logs during tests. More details can be found in this PR (noir-lang/noir#630).
Solution
Having
Directive::Log
collect logs into a vector that is returned from the PWG would be the ideal solution. This would then enable whomever is callingbackend.solve
to handle the logs as they see fit. Such as printing to std out, writing to file, or accessing a vector of logs in memory.Alternatives considered
There are not many alternatives if we want to enable devs to access the PWG logs in memory. Also it is a superior design to have whomever is calling
backend.solve
decide how to handle the system logs (nargo, JS packages).Additional context
Relevant feature requested in Noir that requires this change: noir-lang/noir#688
The text was updated successfully, but these errors were encountered: