transform log in writer
parent
9602c569ec
commit
84ddbfbe69
|
@ -3,6 +3,7 @@ package types
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
@ -213,6 +214,7 @@ type Log struct {
|
|||
}
|
||||
|
||||
func (l *Log) Write(p []byte) (n int, err error) {
|
||||
os.Stdout.Write([]byte(fmt.Sprintf("- %s\n", string(p))))
|
||||
l.AddHistory(string(p))
|
||||
return len(p), nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue