Update yaml parser

Mark the top level Loglevel field as deprecated

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
Derek McGowan
2018-08-14 15:23:04 -07:00
parent 94deea2951
commit f0ee5720a5
19 changed files with 855 additions and 492 deletions

View File

@@ -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