- Added jail name to ban/unban log

git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@404 a942ae1a-1317-0410-a47c-b1dcaea8d605
0.x
Cyril Jaquier 2006-10-02 21:15:56 +00:00
parent d231a8ca6f
commit 033160eb96
1 changed files with 3 additions and 3 deletions

View File

@ -133,7 +133,7 @@ class Actions(JailThread):
bTicket = BanManager.createBanTicket(ticket) bTicket = BanManager.createBanTicket(ticket)
aInfo["ip"] = bTicket.getIP() aInfo["ip"] = bTicket.getIP()
aInfo["failures"] = bTicket.getAttempt() aInfo["failures"] = bTicket.getAttempt()
logSys.warn("Ban %s" % aInfo["ip"]) logSys.warn("[%s] Ban %s" % self.jail.getName(), aInfo["ip"])
for action in self.__actions: for action in self.__actions:
action.execActionBan(aInfo) action.execActionBan(aInfo)
self.__banManager.addBanTicket(bTicket) self.__banManager.addBanTicket(bTicket)
@ -149,7 +149,7 @@ class Actions(JailThread):
for ticket in self.__banManager.unBanList(time.time()): for ticket in self.__banManager.unBanList(time.time()):
aInfo = dict() aInfo = dict()
aInfo["ip"] = ticket.getIP() aInfo["ip"] = ticket.getIP()
logSys.warn("Unban %s" % aInfo["ip"]) logSys.warn("[%s] Unban %s" % self.jail.getName(), aInfo["ip"])
for action in self.__actions: for action in self.__actions:
action.execActionUnban(aInfo) action.execActionUnban(aInfo)
@ -163,7 +163,7 @@ class Actions(JailThread):
for ticket in self.__banManager.flushBanList(): for ticket in self.__banManager.flushBanList():
aInfo = dict() aInfo = dict()
aInfo["ip"] = ticket.getIP() aInfo["ip"] = ticket.getIP()
logSys.info("Unban %s" % aInfo["ip"]) logSys.warn("[%s] Unban %s" % self.jail.getName(), aInfo["ip"])
for action in self.__actions: for action in self.__actions:
action.execActionUnban(aInfo) action.execActionUnban(aInfo)