Skip to content

Commit

Permalink
re-add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Tit Petric committed Aug 16, 2023
1 parent 30e697b commit 7a1605a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions gateway/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,17 @@ func (gw *Gateway) doAddOrUpdate(keyName string, newSession *user.SessionState,
for apiId := range newSession.AccessRights {
apiSpec := gw.getApiSpec(apiId)
if apiSpec == nil {
log.WithFields(logrus.Fields{
"prefix": "api",
"key": keyName,
"org_id": newSession.OrgID,
"api_id": apiId,
"user_id": "system",
"user_ip": "--",
"path": "--",
"server_name": "system",
}).Warn("API inactive or doesn't exist.")

apiSpec = &APISpec{
APIDefinition: &apidef.APIDefinition{
APIID: apiId,
Expand Down

0 comments on commit 7a1605a

Please sign in to comment.