Merge pull request #1002 from adamcik/fix/694
config: Debug log ignored sections (fixes: #694)
This commit is contained in:
commit
635ee6e4eb
@ -48,6 +48,8 @@ v0.20.0 (UNRELEASED)
|
||||
This can be used to show absolutely all log records, including those at
|
||||
custom levels below ``DEBUG``.
|
||||
|
||||
- Add debug logging of unknown sections. (Fixes: :issue:`694`)
|
||||
|
||||
**Logging**
|
||||
|
||||
- Add custom log level ``TRACE`` (numerical level 5), which can be used by
|
||||
|
||||
@ -177,13 +177,19 @@ def _validate(raw_config, schemas):
|
||||
# Get validated config
|
||||
config = {}
|
||||
errors = {}
|
||||
sections = set(raw_config)
|
||||
for schema in schemas:
|
||||
sections.discard(schema.name)
|
||||
values = raw_config.get(schema.name, {})
|
||||
result, error = schema.deserialize(values)
|
||||
if error:
|
||||
errors[schema.name] = error
|
||||
if result:
|
||||
config[schema.name] = result
|
||||
|
||||
for section in sections:
|
||||
logger.debug('Ignoring unknown config section: %s', section)
|
||||
|
||||
return config, errors
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user