BF: log errors to syslog and respect the showRet parameter

pull/404/head
Daniel Black 2013-10-22 23:25:43 +11:00
parent b61fe0f12d
commit 2b3e866f5f
1 changed files with 3 additions and 2 deletions

View File

@ -155,7 +155,8 @@ class Fail2banClient:
if showRet: if showRet:
print beautifier.beautify(ret[1]) print beautifier.beautify(ret[1])
else: else:
logSys.debug("NOK: " + `ret[1].args`) logSys.error("NOK: " + `ret[1].args`)
if showRet:
print beautifier.beautifyError(ret[1]) print beautifier.beautifyError(ret[1])
return False return False
except socket.error: except socket.error: