diff --git a/api.go b/api.go index 34fa77f..cb14396 100644 --- a/api.go +++ b/api.go @@ -4,10 +4,11 @@ import ( "bytes" "encoding/json" "io" - "log" "strconv" "strings" "time" + + log "github.com/sirupsen/logrus" ) var ( @@ -16,7 +17,7 @@ var ( func init() { sessionID = RandomString(5) + Nonce() - log.Printf("Session ID: %s", sessionID) + log.WithField("sessionId", sessionID).Debug("Session ID Generated") } type Term struct { diff --git a/helpers.go b/helpers.go index d39817d..3eb6d47 100644 --- a/helpers.go +++ b/helpers.go @@ -3,12 +3,13 @@ package main import ( "fmt" "io" - "log" "math/rand" "net/http" "strconv" "strings" "time" + + log "github.com/sirupsen/logrus" ) func BuildRequestWithBody(method string, path string, params map[string]string, body io.Reader) *http.Request { diff --git a/session.go b/session.go index 33ef97a..f5b8995 100644 --- a/session.go +++ b/session.go @@ -1,9 +1,10 @@ package main import ( - "log" "net/http/cookiejar" "net/url" + + log "github.com/sirupsen/logrus" ) func setup(cookies *cookiejar.Jar) {