tuned.py: logging level can be set separately for each module
This commit is contained in:
parent
e0b52c07e5
commit
d0b5d0cc65
1 changed files with 5 additions and 3 deletions
8
tuned.py
8
tuned.py
|
|
@ -81,9 +81,11 @@ class Tuned:
|
|||
|
||||
self.__initplugins__(path, "monitorplugins", self.mp)
|
||||
self.__initplugins__(path, "tuningplugins", self.tp)
|
||||
for p in self.mp:
|
||||
p.init(self.config)
|
||||
for p in self.tp:
|
||||
|
||||
for p in self.mp + self.tp:
|
||||
if not debug and self.config.has_option(p.config_section, "logging"):
|
||||
logging.getLogger("tuned.%s" % p.config_section.lower()).setLevelString(self.config.get(p.config_section, "logging"))
|
||||
|
||||
p.init(self.config)
|
||||
|
||||
def run(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue