MCPcopy Create free account
hub / github.com/zalando/skipper / createAccessLog

Function createAccessLog

logging/log.go:79–99  ·  view source on GitHub ↗
(o Options)

Source from the content-addressed store, hash-verified

77}
78
79func createAccessLog(o Options) *AccessLogger {
80 l := logrus.New()
81 if o.AccessLogFormatter != nil {
82 l.Formatter = o.AccessLogFormatter
83 } else if o.AccessLogJSONEnabled {
84 if o.AccessLogJsonFormatter != nil {
85 l.Formatter = o.AccessLogJsonFormatter
86 } else {
87 l.Formatter = &logrus.JSONFormatter{TimestampFormat: dateFormat, DisableTimestamp: true}
88 }
89 } else {
90 l.Formatter = &accessLogFormatter{accessLogFormat}
91 }
92 l.Out = o.AccessLogOutput
93 l.Level = logrus.InfoLevel
94
95 return &AccessLogger{
96 stripQuery: o.AccessLogStripQuery,
97 log: l,
98 }
99}
100
101func NewAccessLogger(o Options) *AccessLogger {
102 initApplicationLog(o)

Callers 1

NewAccessLoggerFunction · 0.85

Calls 1

NewMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…