Skip to content
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

feature request: std::println please #11407

Open
twt-- opened this issue Jan 22, 2025 · 0 comments
Open

feature request: std::println please #11407

twt-- opened this issue Jan 22, 2025 · 0 comments

Comments

@twt--
Copy link
Contributor

twt-- commented Jan 22, 2025

I know https://docs.aztec.network/reference/developer_references/debugging says that std::println doesn't work in contracts, but it actually does work in public functions. It does not work in private functions, giving me this error when called:

Failed calling external resolver. ErrorObject { code: InvalidRequest, message: "Oracle callback print not found", data: None }

Can std::println please be made to work? Or can aztec::oracle::debug_log be made to work how std::println works in terms of where the output is displayed? It is extremely useful when running tests as the output gets shown alongside the test name like:

--- test::foo::bar ---
useful std::println output
----------------------

Using aztec::oracle::debug_log is tedious compared to this. I have to make sure I set LOG_LEVEL appropriately, save the output to a file so I can grep through it because of the firehose of data, then guess what test caused the debug log message, and then manually run individual tests to figure out if I guessed correctly or not. It would be a huge time saver to instead have debug output alongside the test names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant