ordered dict replaced with dict + change log entry fix

# Conflicts:
#	fail2ban/server/filter.py
pull/1266/head
sebres 2015-12-12 15:46:45 +01:00
parent 48202f998d
commit 6d984717b5
2 changed files with 4 additions and 8 deletions

View File

@ -59,8 +59,9 @@ ver. 0.9.4 (2015/XX/XXX) - wanna-be-released
rest api and web interface (gh-1223) rest api and web interface (gh-1223)
* Add *_backend options for services to allow distros to set the default * Add *_backend options for services to allow distros to set the default
backend per service, set default to systemd for Fedora as appropriate backend per service, set default to systemd for Fedora as appropriate
* small improvement for better handling of many log files (gh-1265) * Performance improvements while monitoring large number of files (gh-1265).
Thanks @kshetragia Use associative array (dict) for monitored log files to speed up lookup
operations. Thanks @kshetragia
ver. 0.9.3 (2015/08/01) - lets-all-stay-friends ver. 0.9.3 (2015/08/01) - lets-all-stay-friends
---------- ----------

View File

@ -38,11 +38,6 @@ from .failregex import FailRegex, Regex, RegexException
from .action import CommandAction from .action import CommandAction
from ..helpers import getLogger from ..helpers import getLogger
try:
from collections import OrderedDict
except ImportError:
OrderedDict = dict
# Gets the instance of the logger. # Gets the instance of the logger.
logSys = getLogger(__name__) logSys = getLogger(__name__)
@ -557,7 +552,7 @@ class FileFilter(Filter):
def __init__(self, jail, **kwargs): def __init__(self, jail, **kwargs):
Filter.__init__(self, jail, **kwargs) Filter.__init__(self, jail, **kwargs)
## The log file path. ## The log file path.
self.__logs = OrderedDict() self.__logs = dict()
self.setLogEncoding("auto") self.setLogEncoding("auto")
## ##