mirror of
https://github.com/42wim/matterbridge.git
synced 2024-12-19 07:22:01 -08:00
23 lines
337 B
Go
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{})
|
||
|
}
|