mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 09:53:48 +00:00
main: make structlogger print output correctly
This commit is contained in:
parent
339c13a2f3
commit
4635482b30
2 changed files with 2 additions and 4 deletions
|
|
@ -235,9 +235,7 @@ Gas used: %d
|
||||||
|
|
||||||
`, execTime, mem.HeapObjects, mem.Alloc, mem.TotalAlloc, mem.NumGC, initialGas-leftOverGas)
|
`, execTime, mem.HeapObjects, mem.Alloc, mem.TotalAlloc, mem.NumGC, initialGas-leftOverGas)
|
||||||
}
|
}
|
||||||
if tracer != nil {
|
if tracer == nil {
|
||||||
tracer.CaptureEnd(ret, initialGas-leftOverGas, execTime, err)
|
|
||||||
} else {
|
|
||||||
fmt.Printf("0x%x\n", ret)
|
fmt.Printf("0x%x\n", ret)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf(" error: %v\n", err)
|
fmt.Printf(" error: %v\n", err)
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ func (l *StructLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration
|
||||||
l.output = output
|
l.output = output
|
||||||
l.err = err
|
l.err = err
|
||||||
if l.cfg.Debug {
|
if l.cfg.Debug {
|
||||||
fmt.Printf("0x%x", output)
|
fmt.Printf("0x%x\n", output)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf(" error: %v\n", err)
|
fmt.Printf(" error: %v\n", err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue