Skip to content

Conversation

@mateustd-ciandt
Copy link
Contributor

Fixes #195

This PR updates the logging mechanism in TestContext::log by enhancing the output format. The previous implementation simply printed the log message, while the new version provides more context by displaying the log level, memory address of the message, and its size.

This change will improve our debugging and tracing capabilities, making it easier to monitor logs and evaluate performance during development. Feel free to modify it as necessary!

@mateustd-ciandt mateustd-ciandt requested a review from a team as a code owner July 23, 2025 15:59
std::cout << "TRACE from testcontext: [log] " << message << std::endl;
std::cout << "TRACE from integration: [vm->host] env.proxy_log("
<< log_level << ", "
<< reinterpret_cast<uint64_t>(message.data()) << ", "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how useful it is to display the address and size of the message string, given that the value of the string is already output. Did you have a case in mind where this information would be valuable?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Friendly ping on this PR. I had a use for it today (testing/inspecting a plugin I did not write and trying to understand its behaviors).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be usefull especially in scenarios where memory management issues may arise, but I don't have a case in mind yet. @martijneken do you think the current modifications would bring additional benefits this way? thanks!

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

Successfully merging this pull request may close these issues.

Plugins tester: improve wasm tracing for string params

3 participants