diff --git a/common.go b/common.go new file mode 100644 index 0000000..961fe7b --- /dev/null +++ b/common.go @@ -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) +}