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 Nov 15, 2023. It is now read-only.
Right now in order to log something from the runtime using the log crate, you will have to initialize the RuntimeLogger first.
That leads to odd looking code such as this. This is done so that we don't format and send over to the host if the logging is not enabled. As soon as the logger is enabled it will send everything over to the host.
Now, that's a bit annoying because:
it's not a fundamental limitation. If one wants to print something badly, they can use the relevant API directly.
Even though the formatting code is compiled in and sitting there anyway (or at least it looks by the code, I haven't checked it in the final binary), in order to look at the output you'd need to recompile the wasm runtime.
For some cases it would be easier to just look at the output of the native runtime, for others there is no easy way.
Solution here, is to enable logging implicitly for every runtime call, detect the highest log level we need to print and then cache it in thread local so that we only do that once.
The text was updated successfully, but these errors were encountered:
Right now in order to log something from the runtime using the
log
crate, you will have to initialize theRuntimeLogger
first.That leads to odd looking code such as this. This is done so that we don't format and send over to the host if the logging is not enabled. As soon as the logger is enabled it will send everything over to the host.
Now, that's a bit annoying because:
For some cases it would be easier to just look at the output of the native runtime, for others there is no easy way.
Solution here, is to enable logging implicitly for every runtime call, detect the highest log level we need to print and then cache it in thread local so that we only do that once.
The text was updated successfully, but these errors were encountered: