simplified logging. creates logging stuff in linspector now. no Logger class needed anymore. more advanced output in log message like filename,funcname,linenumber

This commit is contained in:
Johannes Findeisen 2013-09-25 03:08:24 +02:00
commit 530fd2a2ba
4 changed files with 51 additions and 22 deletions

View file

@ -27,12 +27,12 @@ class Command:
try:
self.commandStart = dt.now()
self.log.i("calling command " + str(self.command) + " at " + str(self.commandStart))
self.log.info("calling command " + str(self.command) + " at " + str(self.commandStart))
#self.output=sp.check_output(self.command.split())
process = Popen(self.command, stdout=sp.PIPE, stderr=sp.PIPE, shell=True)
self.output, self.error = process.communicate()
self.log.d(str(self.output))
self.log.d(str(self.error))
self.log.debug(str(self.output))
self.log.debug(str(self.error))
self.retcode = process.poll()
except CalledProcessError:
self.error = CalledProcessError.output