Some normalizing and little more logging for monitors. (0.21.8)
This commit is contained in:
parent
9240012594
commit
edaeceda69
2 changed files with 5 additions and 8 deletions
|
|
@ -18,7 +18,7 @@ from linspector.environment import Environment
|
||||||
from linspector.linspector import Linspector
|
from linspector.linspector import Linspector
|
||||||
from linspector.monitors import Monitors
|
from linspector.monitors import Monitors
|
||||||
|
|
||||||
__version__ = '0.21.7'
|
__version__ = '0.21.8'
|
||||||
__author__ = 'Johannes Findeisen <you@hanez.org>'
|
__author__ = 'Johannes Findeisen <you@hanez.org>'
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -47,7 +47,7 @@ def parse_args():
|
||||||
|
|
||||||
def linspector():
|
def linspector():
|
||||||
args = parse_args()
|
args = parse_args()
|
||||||
monitors = None
|
monitors = {}
|
||||||
notifications = {}
|
notifications = {}
|
||||||
plugins = {}
|
plugins = {}
|
||||||
# the scheduler is a dict to make it possible in the future to run more than one scheduler in
|
# the scheduler is a dict to make it possible in the future to run more than one scheduler in
|
||||||
|
|
|
||||||
|
|
@ -142,15 +142,12 @@ class Monitor:
|
||||||
self.__tasks = tasks
|
self.__tasks = tasks
|
||||||
|
|
||||||
def execute(self):
|
def execute(self):
|
||||||
self.__log.debug('identifier=' + self.__identifier +
|
self.__log.debug('identifier=' + self.__identifier + ' object=' + str(self))
|
||||||
' object=' + str(self))
|
self.__log.debug('identifier=' + self.__identifier + ' message=handle call to service')
|
||||||
self.__log.debug('identifier=' + self.__identifier +
|
|
||||||
' message=handle call to service')
|
|
||||||
|
|
||||||
if self.__enabled:
|
if self.__enabled:
|
||||||
try:
|
try:
|
||||||
self.__services[self.__service].execute(self.__identifier,
|
self.__services[self.__service].execute(self.__identifier, self, self.__service,
|
||||||
self, self.__service,
|
|
||||||
**self.__args)
|
**self.__args)
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
self.__log.error(err)
|
self.__log.error(err)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue