-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add Logs for CallFlags.ReadOnly #2963
Comments
I would suggest to add |
The logs checks for storage permissions and safe does not have this permission. |
This was discussed once upon a time in #2783. |
This one i remember. |
We can close this if is solved, now you can use assert with message in |
@shargon how can we solve this issue here: We need to be able to view the logs. Any alternative? |
So, we don't need this? Or the log feature won't work on safe methods? 🤔 |
Won't work on safe methods, Unless you use ExecutionEngine.Assert(true, "Hello World!"); Is what they are arguing. However this shouldn't be the case. @shargon so above code emits |
No, it will fault the execution, and the message will be in the fault Exception. |
Well can we have this than?
Its is impossible to debug |
I think that neo-express show the exception if it happens |
Yes but we still have this issue neo-project/neo-express#309, which is my reason behind doing this issue. Watch the video |
What alternatives do we have to return the logs @shargon ? It's only for development mode. Can we do this in a less intrusive way? like using a plugin? |
No logs alternative in Safe mode... |
@shargon one thing you can do is create a custom Unless it's in the |
Why use a different one in neo-express, it will show you things that can't be replicated in the real network. |
Well i don't want to allow |
Why do you want to make me cry? I worry that it can be intrusive to update the contract manifest to remove safe from methods.
Afaik, compilers work on debug and release mode. We could update the manifest to make it non-safe if they compile it in debug mode. I'm not sure if this is the best solution but it would work |
You can always create a |
This will need to be handled by the compilers / tools. I think we can close this issue. |
Close this issue since we will not implement. |
@Jim8y This was implemented. |
Summary or problem description
Currently you can not emit logs (
Runtime.Log
) with[Safe]
(CallFlags.ReadOnly
). I don't understand the reason behind it. However we should allow this to come through. One good reason is for debugging. Would hate to have to remove[Safe]
from all my contract's; just to debug something and than remember to add it back after testing or debugging.Neo Version
Where in the software does this update applies to?
The text was updated successfully, but these errors were encountered: