changed logging

This commit is contained in:
Rafael.Timmerberg 2013-05-30 01:02:24 +02:00
commit 528f8e41fc
2 changed files with 4 additions and 4 deletions

View file

@ -25,7 +25,7 @@ class Command:
''' '''
try: try:
self.commandStart = dt.now() self.commandStart = dt.now()
self.log.d("calling command " + str(self.command) + " at " + str(self.commandStart)) self.log.i("calling command " + str(self.command) + " at " + str(self.commandStart))
#self.output=sp.check_output(self.command.split()) #self.output=sp.check_output(self.command.split())
process = Popen(self.command, stdout=sp.PIPE, stderr=sp.PIPE, shell=True) process = Popen(self.command, stdout=sp.PIPE, stderr=sp.PIPE, shell=True)
self.output, self.error = process.communicate() self.output, self.error = process.communicate()

View file

@ -23,7 +23,7 @@ class JobInfo:
self.jobs = [] self.jobs = []
def __str__(self): def __str__(self):
return self.name return "JobInfo " + str(self.name)
def setLogger(self, log): def setLogger(self, log):
self.log = log self.log = log
@ -49,8 +49,8 @@ class JobInfo:
cmd=Command(hs.service.command, self.log) cmd=Command(hs.service.command, self.log)
cmd.call() cmd.call()
self.log.d(cmd.getAllOutput()) self.log.d(cmd.getAllOutput())
except Error: except Exception:
self.log.d(Error) self.log.d(Exception)
#must find real service command stored in hosts... #must find real service command stored in hosts...