mirror of
https://github.com/Xevion/banner.git
synced 2025-12-06 07:14:21 -06:00
Switch all logging to logrus, lower session ID log level to debug
This commit is contained in:
5
api.go
5
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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http/cookiejar"
|
||||
"net/url"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func setup(cookies *cookiejar.Jar) {
|
||||
|
||||
Reference in New Issue
Block a user