dc4bc/client/logger.go

20 lines
291 B
Go
Raw Normal View History

2020-08-21 10:03:42 -07:00
package client
import (
"fmt"
)
type logger struct {
userName string
}
func newLogger(username string) *logger {
return &logger{
userName: username,
}
}
func (l *logger) Log(format string, args ...interface{}) {
2020-08-21 13:37:49 -07:00
fmt.Printf("[%s] %s\n", l.userName, fmt.Sprintf(format, args...))
2020-08-21 10:03:42 -07:00
}