5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-30 07:21:35 +00:00
matterbridge/vendor/github.com/shazow/ssh-chat/sshd/logger.go
2017-12-03 01:24:05 +01:00

23 lines
337 B
Go

package sshd
import "io"
import stdlog "log"
var logger *stdlog.Logger
func SetLogger(w io.Writer) {
flags := stdlog.Flags()
prefix := "[sshd] "
logger = stdlog.New(w, prefix, flags)
}
type nullWriter struct{}
func (nullWriter) Write(data []byte) (int, error) {
return len(data), nil
}
func init() {
SetLogger(nullWriter{})
}