mirror of
https://github.com/distribution/distribution.git
synced 2025-09-02 07:25:25 +00:00
Update yaml parser
Mark the top level Loglevel field as deprecated Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
@@ -237,13 +237,6 @@ func configureReporting(app *handlers.App) http.Handler {
|
||||
// configureLogging prepares the context with a logger using the
|
||||
// configuration.
|
||||
func configureLogging(ctx context.Context, config *configuration.Configuration) (context.Context, error) {
|
||||
if config.Log.Level == "" && config.Log.Formatter == "" {
|
||||
// If no config for logging is set, fallback to deprecated "Loglevel".
|
||||
log.SetLevel(logLevel(config.Loglevel))
|
||||
ctx = dcontext.WithLogger(ctx, dcontext.GetLogger(ctx))
|
||||
return ctx, nil
|
||||
}
|
||||
|
||||
log.SetLevel(logLevel(config.Log.Level))
|
||||
|
||||
formatter := config.Log.Formatter
|
||||
|
Reference in New Issue
Block a user