diff options
author | Wim <wim@42.be> | 2017-12-03 01:24:05 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2017-12-03 01:24:05 +0100 |
commit | ed9118b34620f1ecd5f28506328d4ffe1b04793d (patch) | |
tree | 442998012f6779446a463e402fa7c0836edcac91 /vendor/github.com/shazow/ssh-chat/sshd/logger.go | |
parent | 59e55cfbd5cc3c82236c5e8b95e5baff256f7143 (diff) | |
download | matterbridge-msglm-ed9118b34620f1ecd5f28506328d4ffe1b04793d.tar.gz matterbridge-msglm-ed9118b34620f1ecd5f28506328d4ffe1b04793d.tar.bz2 matterbridge-msglm-ed9118b34620f1ecd5f28506328d4ffe1b04793d.zip |
Add sshchat dependencies in vendor
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{}) +} |