Switch all logging to logrus, lower session ID log level to debug

This commit is contained in:
2023-12-24 15:02:01 -06:00
parent 50272dddd8
commit 40330c37ce
3 changed files with 7 additions and 4 deletions

5
api.go
View File

@@ -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 {

View File

@@ -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 {

View File

@@ -1,9 +1,10 @@
package main
import (
"log"
"net/http/cookiejar"
"net/url"
log "github.com/sirupsen/logrus"
)
func setup(cookies *cookiejar.Jar) {