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

This commit is contained in:
Justin Judd committed 2016-07-30 21:40:28 +09:00
1 parent eb89e656d7
commit f9c07f8395
1 file changed
+18
+18
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)
}