main: make structlogger print output correctly

This commit is contained in:
Martin Holst Swende 2018-03-22 09:00:47 +01:00
parent 339c13a2f3
commit 4635482b30
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0
2 changed files with 2 additions and 4 deletions

View file

@ -235,9 +235,7 @@ Gas used: %d
`, execTime, mem.HeapObjects, mem.Alloc, mem.TotalAlloc, mem.NumGC, initialGas-leftOverGas)
}
if tracer != nil {
tracer.CaptureEnd(ret, initialGas-leftOverGas, execTime, err)
} else {
if tracer == nil {
fmt.Printf("0x%x\n", ret)
if err != nil {
fmt.Printf(" error: %v\n", err)

View file

@ -186,7 +186,7 @@ func (l *StructLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration
l.output = output
l.err = err
if l.cfg.Debug {
fmt.Printf("0x%x", output)
fmt.Printf("0x%x\n", output)
if err != nil {
fmt.Printf(" error: %v\n", err)
}