From 70dfb0216915dc380a7e4a380895a6344a858ae1 Mon Sep 17 00:00:00 2001 From: Renan DelValle Date: Thu, 12 Apr 2018 12:26:54 -0700 Subject: [PATCH] Minor changes to demonstrate how a logger can be used in conjunction to debug mode. --- examples/client.go | 2 ++ realis.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/client.go b/examples/client.go index aaee92e..7162408 100644 --- a/examples/client.go +++ b/examples/client.go @@ -18,6 +18,7 @@ import ( "flag" "fmt" "io/ioutil" + "log" "os" "time" @@ -89,6 +90,7 @@ func main() { Factor: 2.0, Jitter: 0.1, }), + realis.SetLogger(log.New(os.Stdout, "realis-debug: ", log.Ldate)), realis.Debug(), } diff --git a/realis.go b/realis.go index a0f87f7..c9291d1 100644 --- a/realis.go +++ b/realis.go @@ -1035,7 +1035,7 @@ func (r *realisClient) SetQuota(role string, cpu *float64, ramMb *int64, diskMb func (r *realisClient) GetQuota(role string) (*aurora.Response, error) { resp, retryErr := r.thriftCallWithRetries(func() (*aurora.Response, error) { - resp, retryErr :=r.adminClient.GetQuota(role) + resp, retryErr := r.adminClient.GetQuota(role) if retryErr != nil { return nil, errors.Wrap(retryErr, "Unable to get role quota")