Skip to content

Commit dd738c5

Browse files
committed
fix lint
Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
1 parent b40f9fd commit dd738c5

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

auditor/auditor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func (auditor *AzureAuditor) Init() {
8383
auditor.initPrometheus()
8484
auditor.initCache()
8585
auditor.initCron()
86-
86+
8787
validator.Logger = auditor.Logger
8888
}
8989

logger.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
package main
22

33
import (
4-
"fmt"
5-
"net/http"
6-
7-
stringsCommon "github.com/webdevops/go-common/strings"
84
"go.uber.org/zap"
95
"go.uber.org/zap/zapcore"
106
)
@@ -13,19 +9,6 @@ var (
139
logger *zap.SugaredLogger
1410
)
1511

16-
func buildContextLoggerFromRequest(r *http.Request) *zap.SugaredLogger {
17-
contextLogger := logger.With(zap.String("requestPath", r.URL.Path))
18-
19-
for name, value := range r.URL.Query() {
20-
fieldName := fmt.Sprintf("param%s", stringsCommon.UppercaseFirst(name))
21-
fieldValue := value
22-
23-
contextLogger = contextLogger.With(zap.Any(fieldName, fieldValue))
24-
}
25-
26-
return contextLogger
27-
}
28-
2912
func initLogger() *zap.SugaredLogger {
3013
var config zap.Config
3114
if opts.Logger.Development {

0 commit comments

Comments
 (0)