From 7db7967ab183ae1457089ceb32622741c05b28f5 Mon Sep 17 00:00:00 2001 From: Cyril Jaquier Date: Sat, 5 Jan 2008 22:33:44 +0000 Subject: [PATCH] - Added string and regex to log message. git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_8@642 a942ae1a-1317-0410-a47c-b1dcaea8d605 --- server/failregex.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/failregex.py b/server/failregex.py index b41a3be9..398817fd 100644 --- a/server/failregex.py +++ b/server/failregex.py @@ -123,5 +123,8 @@ class FailRegex(Regex): def getHost(self): host = self._matchCache.group("host") if host == None: - raise RegexException("Unexpected error. Please check your regex") + # Gets a few information. + s = self._matchCache.string + r = self._matchCache.re + raise RegexException("No 'host' found in '%s' using '%s'" % (s, r)) return host