Adding a debug logger that is turned off by default.

Info logger is enabled by default but prints out less information.
This commit is contained in:
Renan DelValle 2018-03-06 12:43:09 -08:00
parent 7152f568fe
commit 69442d5957
No known key found for this signature in database
GPG key ID: C240AD6D6F443EC9
5 changed files with 129 additions and 60 deletions

View file

@ -17,6 +17,7 @@ package realis_test
import (
"fmt"
"io/ioutil"
"log"
"os"
"testing"
"time"
@ -40,7 +41,9 @@ func TestMain(m *testing.M) {
// New configuration to connect to Vagrant image
r, err = realis.NewRealisClient(realis.SchedulerUrl("http://192.168.33.7:8081"),
realis.BasicAuth("aurora", "secret"),
realis.TimeoutMS(20000))
realis.TimeoutMS(20000),
realis.DebugLogger(log.New(os.Stdout, "realis-debug: ", log.Ltime|log.LUTC|log.Ldate)))
if err != nil {
fmt.Println("Please run vagrant box before running test suite")
os.Exit(1)