Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
karinamzalez committed Jan 29, 2024
1 parent 4c5588a commit 0939dc6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.1
rev: v8.18.1
hooks:
- id: gitleaks
- repo: https://github.com/tekwizely/pre-commit-golang
rev: master
rev: v1.0.0-rc.1
hooks:
- id: go-imports
args: ['-w']
12 changes: 0 additions & 12 deletions ssas/service/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,6 @@ func Redact(uri string) string {
return uri
}

func LogEntrySetField(r *http.Request, key string, value interface{}) {
if entry, ok := r.Context().Value(middleware.LogEntryCtxKey).(*log.APILoggerEntry); ok {
entry.Logger = entry.Logger.WithField(key, value)
}
}

func LogEntrySetFields(r *http.Request, fields map[string]interface{}) {
if entry, ok := r.Context().Value(middleware.LogEntryCtxKey).(*log.APILoggerEntry); ok {
entry.Logger = entry.Logger.WithFields(fields)
}
}

// NewCtxLogger adds new key value pair of {CtxLoggerKey: logrus.FieldLogger} to the requests context
func NewCtxLogger(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Expand Down

0 comments on commit 0939dc6

Please sign in to comment.