-
Notifications
You must be signed in to change notification settings - Fork 100
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 to execution #737
Closed
+50
−1
Closed
Changes from 8 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
a634f59
add logs to execution
Jim8y 042db65
fix issue
Jim8y 86a68cc
optimise code style
Jim8y a89b625
optimise code
Jim8y f7eefd3
fix log message issue
Jim8y 5b731eb
add log to transaction log
Jim8y 724fc54
remove unused import
Jim8y 4546018
Update LogReader.cs
erikzhang ac65c60
Merge branch 'master' into log-in-execution
Jim8y ea6d01a
make initial more clear
Jim8y e23f226
revert change to rpc client
Jim8y c45f703
add logs to the rpcserver plugin
Jim8y 8888011
use queue to manage logs
Jim8y 46aa190
update JArray
Jim8y 7b9723e
remove log event on dispose
Jim8y 397458c
revert _db change and move log to rpcserver
Jim8y 391abe0
fix error
Jim8y c4b093d
update the function name
Jim8y f7afd69
Merge branch 'master' into log-in-execution
Jim8y 12ded50
revert name change
Jim8y 0bd5c11
Merge branch 'log-in-execution' of github.com:Liaojinghui/neo-modules…
Jim8y 0aa880b
revert csproj change
Jim8y c0f35ec
revert order change
Jim8y 8a83e5c
remove unused use
Jim8y 6d15ff0
Merge branch 'master' into log-in-execution
Jim8y c0e72ac
Merge branch 'master' into log-in-execution
shargon 9c724dd
Merge branch 'master' into log-in-execution
superboyiii 68f35f6
Update RpcServerPlugin.cs
shargon 5783063
make log size configurable
Jim8y 0e3ccb6
Merge branch 'master' into log-in-execution
Jim8y 12a36c6
Merge branch 'master' into log-in-execution
superboyiii b899935
Merge branch 'master' into log-in-execution
Jim8y File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,14 @@ private JObject GetInvokeResult(byte[] script, Signer[] signers = null, Witness[ | |
obj["state"] = ToJson(n.State, session); | ||
return obj; | ||
})); | ||
json["logs"] = new JArray(session.Engine.Notifications.Select(n => | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is incorrect. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This logic was when i try to add the log in the core, checking and removing useless code. |
||
{ | ||
var obj = new JObject(); | ||
obj["eventname"] = n.EventName; | ||
obj["contract"] = n.ScriptHash.ToString(); | ||
obj["state"] = ToJson(n.State, session); | ||
return obj; | ||
})); | ||
if (useDiagnostic) | ||
{ | ||
Diagnostic diagnostic = (Diagnostic)session.Engine.Diagnostic; | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a setting in config.json to control whether logs are saved or not? I think maybe not all nodes want to do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The term
log
andnotify
is abusively miss used, I don't think the user could tell which is log and which is notify.