You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-12-03 22:59:10 +02:00
Allow Logging to stdout with separate Error Log Channel (#718)
* Add dedicated error logging writer * Document new errors to stdout flag * Update changelog * Thread-safe the log buffer * Address feedback * Remove duplication by adding log level * Clean up error formatting * Apply suggestions from code review Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
This commit is contained in:
@@ -40,11 +40,12 @@ func configureLogger(o options.Logging, msgs []string) []string {
|
||||
|
||||
// Supply a sanity warning to the logger if all logging is disabled
|
||||
if !o.StandardEnabled && !o.AuthEnabled && !o.RequestEnabled {
|
||||
logger.Print("Warning: Logging disabled. No further logs will be shown.")
|
||||
logger.Error("Warning: Logging disabled. No further logs will be shown.")
|
||||
}
|
||||
|
||||
// Pass configuration values to the standard logger
|
||||
logger.SetStandardEnabled(o.StandardEnabled)
|
||||
logger.SetErrToInfo(o.ErrToInfo)
|
||||
logger.SetAuthEnabled(o.AuthEnabled)
|
||||
logger.SetReqEnabled(o.RequestEnabled)
|
||||
logger.SetStandardTemplate(o.StandardFormat)
|
||||
|
||||
Reference in New Issue
Block a user