You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-06-21 00:29:44 +02:00
Set up klog to write to our custom logger
This commit is contained in:
@ -149,9 +149,12 @@ func (l *Logger) formatLogMessage(calldepth int, message string) []byte {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
_, err = logBuff.Write([]byte("\n"))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
// If the output doesn't end with a new line, add one
|
||||
if string(logBuff.Bytes()[logBuff.Len()-1]) != "\n" {
|
||||
_, err = logBuff.Write([]byte("\n"))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
return logBuff.Bytes()
|
||||
|
Reference in New Issue
Block a user