From a220b714aabeaf26efce49b285846b996def4bc4 Mon Sep 17 00:00:00 2001 From: Vernon Keenan Date: Thu, 28 Jan 2021 11:17:39 -0800 Subject: [PATCH] fix log --- app/auth0.go | 8 ++++---- app/county-services.go | 8 ++++---- app/place-services.go | 8 ++++---- app/root.go | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/auth0.go b/app/auth0.go index 533a3cb..5c33918 100644 --- a/app/auth0.go +++ b/app/auth0.go @@ -18,7 +18,7 @@ var auth0Expires time.Time // GetAuth0AuthToken is a func func GetAuth0AuthToken() string { - sugar.Infof("board.getAuth0AuthToken: 📥") + sugar.Infof("app.getAuth0AuthToken: 📥") if auth0Expires.After(time.Now()) { return auth0AuthToken } @@ -31,12 +31,12 @@ func GetAuth0AuthToken() string { } response, err := auth0Client.Auth.PostCredentials(apiParams) if err != nil { - sugar.Errorf("board.getAuth0AuthToken: 💣 ⛔ : %w", err) + sugar.Errorf("app.getAuth0AuthToken: 💣 ⛔ : %w", err) } auth0Expires = time.Now().Add(time.Duration(response.Payload.ExpiresIn) * time.Second) auth0AuthToken = response.Payload.AccessToken - sugar.Debugf("board.getAuth0AuthToken: 📏 new token: %s", auth0AuthToken) - sugar.Infof("board.getAuth0AuthToken: 👍 📤 new token retrieved") + sugar.Debugf("app.getAuth0AuthToken: 📏 new token: %s", auth0AuthToken) + sugar.Infof("app.getAuth0AuthToken: 👍 📤 new token retrieved") return auth0AuthToken } diff --git a/app/county-services.go b/app/county-services.go index d5ef4a2..b4e23c5 100644 --- a/app/county-services.go +++ b/app/county-services.go @@ -36,13 +36,13 @@ func GetCountyNameByGeocode(key string, principal *User) string { // GetCountyByGeocode is first class retrieval function func GetCountyByGeocode(recordID string, principal *User) (geo_models.County, error) { - sugar.Debug("plex.getCountyByGeocode: 📥") + sugar.Debug("app.getCountyByGeocode: 📥") if recordID == "" { - return geo_models.County{}, fmt.Errorf("plex.getCountyByID: 💣 ⛔ key is blank") + return geo_models.County{}, fmt.Errorf("app.getCountyByID: 💣 ⛔ key is blank") } obj, ok := countyCache.get(recordID) if ok { - sugar.Debug("plex.getCountyByGeocode: 👍 🎯 📤") + sugar.Debug("app.getCountyByGeocode: 👍 🎯 📤") return *obj, nil } geoParams := county.NewGetCountiesParamsWithTimeout(getTimeout) @@ -56,6 +56,6 @@ func GetCountyByGeocode(recordID string, principal *User) (geo_models.County, er newObj = itm } countyCache.put(recordID, newObj) - sugar.Debug("plex.getCountyByGeocode: 👍 🆕 📤") + sugar.Debug("app.getCountyByGeocode: 👍 🆕 📤") return *newObj, nil } diff --git a/app/place-services.go b/app/place-services.go index ebbaef6..baedbe2 100644 --- a/app/place-services.go +++ b/app/place-services.go @@ -41,13 +41,13 @@ func GetPlaceHasDistrictTaxesByGeocode(key string, principal *User) bool { // GetPlaceByGeocode is first class retrieval function func GetPlaceByGeocode(recordID string, principal *User) (geo_models.Place, error) { - sugar.Debug("plex.getPlaceByGeocode: 📥") + sugar.Debug("app.getPlaceByGeocode: 📥") if recordID == "" { - return geo_models.Place{}, fmt.Errorf("plex.getPlaceByID: 💣 ⛔ key is blank") + return geo_models.Place{}, fmt.Errorf("app.getPlaceByID: 💣 ⛔ key is blank") } obj, ok := placeCache.get(recordID) if ok { - sugar.Debug("plex.getPlaceByGeocode: 👍 🎯 📤") + sugar.Debug("app.getPlaceByGeocode: 👍 🎯 📤") return *obj, nil } geoParams := place.NewGetPlacesParamsWithTimeout(getTimeout) @@ -61,6 +61,6 @@ func GetPlaceByGeocode(recordID string, principal *User) (geo_models.Place, erro newObj = itm } placeCache.put(recordID, newObj) - sugar.Debug("plex.getPlaceByGeocode: 👍 🆕 📤") + sugar.Debug("app.getPlaceByGeocode: 👍 🆕 📤") return *newObj, nil } diff --git a/app/root.go b/app/root.go index ca1b0a8..8e6bf11 100644 --- a/app/root.go +++ b/app/root.go @@ -68,7 +68,7 @@ func InitConfig(systemName string, initalLogLevel zapcore.Level) { } func initAPIUsers() map[string]User { - sugar.Info("board.initAPIUsers: 📥") + sugar.Info("app.initAPIUsers: 📥") users := map[string]User{ "auth": { APIKey: GetServiceAccount("auth").APIKey, @@ -86,6 +86,6 @@ func initAPIUsers() map[string]User { GetServiceAccount("test-service-account").APIKey), }, } - sugar.Debugf("board.initAPIUsers: 👍 📤") + sugar.Debugf("app.initAPIUsers: 👍 📤") return users }