runtime: tune runtime.Log messages
Add transaction hash, print contract hash in LE (as all user-facing functions do) and don't double-quote the message, zap already does quoting of its own.
This commit is contained in:
parent
d33dcd557a
commit
453012ff16
2 changed files with 9 additions and 7 deletions
|
@ -125,10 +125,8 @@ func TestLog(t *testing.T) {
|
|||
var logMsg map[string]interface{}
|
||||
require.NoError(t, json.Unmarshal([]byte(ls[0]), &logMsg))
|
||||
require.Equal(t, "info", logMsg["level"])
|
||||
require.Equal(t, "runtime log", logMsg["msg"])
|
||||
require.Equal(t, h.StringBE(), logMsg["script"])
|
||||
require.Equal(t, `"hello"`, logMsg["logs"])
|
||||
|
||||
require.Equal(t, "hello", logMsg["msg"])
|
||||
require.Equal(t, h.StringLE(), logMsg["script"])
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue