land/cmd/land/logfile.go

17 lines
305 B
Go

package main
import "log"
type loggerFile struct {
*log.Logger
}
func (l loggerFile) Close() error { return nil }
func (l loggerFile) Read([]byte) (int, error) { return 0, ErrNotSupported }
func (l loggerFile) Write(data []byte) (int, error) {
l.Printf("%s", string(data))
return len(data), nil
}