mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-10 11:00:27 +00:00
24 lines
392 B
Go
24 lines
392 B
Go
package sshd
|
|
|
|
import "io"
|
|
import stdlog "log"
|
|
|
|
var logger *stdlog.Logger
|
|
|
|
// SetLogger sets the package logging output to use w.
|
|
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{})
|
|
}
|