commit b0b782da304babcff3ef64374c79bc879cbdc303
Author: Rob Crittenden <rcritten@redhat.com>
Date: Wed May 5 16:30:43 2021 -0400
Restore the log level after loading the resources
It seems that loading the resources can affect the log level so
save it off before loading them and then restore it.
I'm not entirely sure what is happening but this is an easy fix
and we can address it further later if we want.
Signed-off-by: Rob Crittenden <rcritten@redhat.com>
diff --git a/src/ipahealthcheck/core/core.py b/src/ipahealthcheck/core/core.p
y
index 4ba94be..2d00586 100644
--- a/src/ipahealthcheck/core/core.py
+++ b/src/ipahealthcheck/core/core.py
@@ -21,12 +21,15 @@ logger = logging.getLogger()
def find_registries(entry_points):
+ # Loading the resources may reset the log level, save it.
+ log_level = logger.level
registries = {}
for entry_point in entry_points:
registries.update({
ep.name: ep.resolve()
for ep in pkg_resources.iter_entry_points(entry_point)
})
+ logger.setLevel(log_level)
return registries