MCPcopy Create free account
hub / github.com/efficientgo/e2e / Log

Method Log

logger.go:35–47  ·  view source on GitHub ↗
(keyvals ...interface{})

Source from the content-addressed store, hash-verified

33}
34
35func (l *SimpleLogger) Log(keyvals ...interface{}) error {
36 b := strings.Builder{}
37 b.WriteString(time.Now().Format("15:04:05"))
38
39 for _, v := range keyvals {
40 b.WriteString(" " + fmt.Sprintf("%v", v))
41 }
42
43 b.WriteString("\n")
44
45 _, err := l.w.Write([]byte(b.String()))
46 return err
47}
48
49type LinePrefixLogger struct {
50 prefix string

Callers

nothing calls this directly

Calls 2

WriteMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected