Revert "cmd/evm: change error msg output to stderr (#17118)"

This reverts commit fb9f7261ec.
This commit is contained in:
Péter Szilágyi
2018-08-01 19:09:08 +03:00
parent 46d4721519
commit 83e2761c3a
5 changed files with 22 additions and 23 deletions

View File

@ -107,7 +107,7 @@ func stateTestCmd(ctx *cli.Context) error {
}
// print state root for evmlab tracing (already committed above, so no need to delete objects again
if ctx.GlobalBool(MachineFlag.Name) && state != nil {
fmt.Fprintf(ctx.App.ErrWriter, "{\"stateRoot\": \"%x\"}\n", state.IntermediateRoot(false))
fmt.Fprintf(os.Stderr, "{\"stateRoot\": \"%x\"}\n", state.IntermediateRoot(false))
}
results = append(results, *result)
@ -115,13 +115,13 @@ func stateTestCmd(ctx *cli.Context) error {
// Print any structured logs collected
if ctx.GlobalBool(DebugFlag.Name) {
if debugger != nil {
fmt.Fprintln(ctx.App.ErrWriter, "#### TRACE ####")
vm.WriteTrace(ctx.App.ErrWriter, debugger.StructLogs())
fmt.Fprintln(os.Stderr, "#### TRACE ####")
vm.WriteTrace(os.Stderr, debugger.StructLogs())
}
}
}
}
out, _ := json.MarshalIndent(results, "", " ")
fmt.Fprintln(ctx.App.Writer, string(out))
fmt.Println(string(out))
return nil
}