Merge pull request #673 from kwirk/jail-init-error

DOC: Improve error logging when specific backend set and fails
pull/675/head
Daniel Black 2014-03-31 18:31:16 +11:00
commit d99a663ad0
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(