2015-01-21 20:47:59 +01:00
|
|
|
package sshchat
|
2014-12-07 08:31:23 +01:00
|
|
|
|
|
|
|
import (
|
2019-01-23 17:31:33 +01:00
|
|
|
"io/ioutil"
|
2015-01-20 04:16:37 +01:00
|
|
|
|
|
|
|
"github.com/alexcesaro/log"
|
2014-12-07 08:31:23 +01:00
|
|
|
"github.com/alexcesaro/log/golog"
|
|
|
|
)
|
|
|
|
|
|
|
|
var logger *golog.Logger
|
2015-01-20 04:16:37 +01:00
|
|
|
|
2019-01-25 18:07:34 +01:00
|
|
|
// SetLogger sets the package logging to use l.
|
2015-01-21 20:47:59 +01:00
|
|
|
func SetLogger(l *golog.Logger) {
|
|
|
|
logger = l
|
|
|
|
}
|
|
|
|
|
2015-01-20 04:16:37 +01:00
|
|
|
func init() {
|
|
|
|
// Set a default null logger
|
2019-01-23 17:31:33 +01:00
|
|
|
SetLogger(golog.New(ioutil.Discard, log.Debug))
|
2015-01-20 04:16:37 +01:00
|
|
|
}
|