Giving control to the user of the library as to how they want to use a logger. Logger for gorealis only needs Print, Printf, and Println receiver functions. Example in the client uses the std library log.

This commit is contained in:
Renan DelValle 2017-11-29 12:27:07 -08:00
parent 878a11f896
commit d074fd9d0c
3 changed files with 17 additions and 23 deletions

View file

@ -27,6 +27,7 @@ import (
"github.com/paypal/gorealis"
"github.com/paypal/gorealis/gen-go/apache/aurora"
"github.com/paypal/gorealis/response"
"log"
)
var cmd, executor, url, clustersConfig, clusterName, updateId, username, password, zkUrl, hostList string
@ -87,6 +88,7 @@ func main() {
Factor: 2.0,
Jitter: 0.1,
}),
realis.SetLogger(log.New(os.Stdout, "realis-debug: ", log.Ldate)),
}
//check if zkUrl is available.