MCPcopy
hub / github.com/oauth2-proxy/oauth2-proxy / Output

Method Output

pkg/logger/logger.go:162–180  ·  view source on GitHub ↗

Output a standard log template with a simple message to default output channel. Write a final newline at the end of every message.

(lvl Level, calldepth int, message string)

Source from the content-addressed store, hash-verified

160// Output a standard log template with a simple message to default output channel.
161// Write a final newline at the end of every message.
162func (l *Logger) Output(lvl Level, calldepth int, message string) {
163 l.mu.Lock()
164 defer l.mu.Unlock()
165 if !l.stdEnabled {
166 return
167 }
168 msg := l.formatLogMessage(calldepth+1, message)
169
170 var err error
171 switch lvl {
172 case ERROR:
173 _, err = l.errWriter.Write(msg)
174 default:
175 _, err = l.writer.Write(msg)
176 }
177 if err != nil {
178 panic(err)
179 }
180}
181
182// PrintAuthf writes auth info to the logger. Requires an http.Request to
183// log request details. Remaining arguments are handled in the manner of

Callers 12

PrintFunction · 0.80
PrintfFunction · 0.80
PrintlnFunction · 0.80
ErrorFunction · 0.80
ErrorfFunction · 0.80
ErrorlnFunction · 0.80
FatalFunction · 0.80
FatalfFunction · 0.80
FatallnFunction · 0.80
PanicFunction · 0.80
PanicfFunction · 0.80
PaniclnFunction · 0.80

Calls 3

formatLogMessageMethod · 0.95
LockMethod · 0.65
WriteMethod · 0.45

Tested by

no test coverage detected