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

Function initApplicationLog

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

Source from the content-addressed store, hash-verified

61}
62
63func initApplicationLog(o Options) {
64 if o.ApplicationLogJSONEnabled {
65 if o.ApplicationLogJsonFormatter != nil {
66 logrus.SetFormatter(o.ApplicationLogJsonFormatter)
67 } else {
68 logrus.SetFormatter(&logrus.JSONFormatter{})
69 }
70 } else if o.ApplicationLogPrefix != "" {
71 logrus.SetFormatter(&prefixFormatter{o.ApplicationLogPrefix, logrus.StandardLogger().Formatter})
72 }
73
74 if o.ApplicationLogOutput != nil {
75 logrus.SetOutput(o.ApplicationLogOutput)
76 }
77}
78
79func createAccessLog(o Options) *AccessLogger {
80 l := logrus.New()

Callers 1

NewAccessLoggerFunction · 0.85

Calls 2

SetFormatterMethod · 0.80
SetOutputMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…