Moved logging to use package level logger. Disabled by default.

This commit is contained in:
Justin Judd 2016-07-30 21:40:28 +09:00
parent eb89e656d7
commit f9c07f8395

18
common.go Normal file
View File

@ -0,0 +1,18 @@
package sshrpc
import (
"io"
"io/ioutil"
"log"
)
var logger *log.Logger
func init() {
logger = log.New(ioutil.Discard, "sshrpc", 0)
}
// EnableLogging enables logging for the sshrpc library
func EnableLogging(output io.Writer) {
logger.SetOutput(output)
}