always pass a cluster name as a logger field

This commit is contained in:
Murat Kabilov
2017-08-15 10:29:18 +02:00
parent e26db66cb5
commit 5470f20be4
6 changed files with 38 additions and 33 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ type API struct {
}
// NewTeamsAPI creates an object to query the team API.
func NewTeamsAPI(url string, log *logrus.Logger) *API {
func NewTeamsAPI(url string, log *logrus.Entry) *API {
t := API{
url: strings.TrimRight(url, "/"),
httpClient: &http.Client{},
+1 -1
View File
@@ -11,7 +11,7 @@ import (
)
var (
logger = logrus.New()
logger = logrus.New().WithField("pkg", "teamsapi")
token = "ec45b1cfbe7100c6315d183a3eb6cec0M2U1LWJkMzEtZDgzNzNmZGQyNGM3IiwiYXV0aF90aW1lIjoxNDkzNzMwNzQ1LCJpc3MiOiJodHRwcz"
)