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