DOC: Improve error logging when specific backend set and fails

pull/673/head
Steven Hiscocks 2014-03-29 23:08:37 +00:00
parent 3781ff845a
commit 953ebd62c6
1 changed files with 3 additions and 1 deletions

View File

@ -104,7 +104,9 @@ class Jail:
self.__actions = Actions(self)
return # we are done
except ImportError, e:
logSys.debug(
# Log debug if auto, but error if specific
logSys.log(
logging.DEBUG if backend == "auto" else logging.ERROR,
"Backend %r failed to initialize due to %s" % (b, e))
# log error since runtime error message isn't printed, INVALID COMMAND
logSys.error(