diff options
Diffstat (limited to 'vendor/github.com/shazow/ssh-chat/sshd/logger.go')
-rw-r--r-- | vendor/github.com/shazow/ssh-chat/sshd/logger.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/vendor/github.com/shazow/ssh-chat/sshd/logger.go b/vendor/github.com/shazow/ssh-chat/sshd/logger.go new file mode 100644 index 00000000..9f6998f0 --- /dev/null +++ b/vendor/github.com/shazow/ssh-chat/sshd/logger.go @@ -0,0 +1,22 @@ +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{}) +} |