mirror of https://github.com/fail2ban/fail2ban
				
				
				
			Merge branch '0.9-log-level-msg' into 0.10
						commit
						873f97c6c5
					
				| 
						 | 
				
			
			@ -315,6 +315,7 @@ releases.
 | 
			
		|||
    - filter.d/domino-smtp: IBM Domino SMTP task (gh-1603)
 | 
			
		||||
 | 
			
		||||
### Enhancements
 | 
			
		||||
* Introduced new log-level `MSG` (as INFO-2, equivalent to 18)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ver. 0.9.6 (2016/12/10) - stretch-is-coming
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,8 +27,10 @@ __license__ = "GPL"
 | 
			
		|||
import logging.handlers
 | 
			
		||||
 | 
			
		||||
# Custom debug levels
 | 
			
		||||
logging.MSG = logging.INFO - 2
 | 
			
		||||
logging.TRACEDEBUG = 7
 | 
			
		||||
logging.HEAVYDEBUG = 5
 | 
			
		||||
logging.addLevelName(logging.MSG, 'MSG')
 | 
			
		||||
logging.addLevelName(logging.TRACEDEBUG, 'TRACE')
 | 
			
		||||
logging.addLevelName(logging.HEAVYDEBUG, 'HEAVY')
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1119,7 +1119,7 @@ class FileContainer:
 | 
			
		|||
		## sys.stdout.flush()
 | 
			
		||||
		# Compare hash and inode
 | 
			
		||||
		if self.__hash != myHash or self.__ino != stats.st_ino:
 | 
			
		||||
			logSys.info("Log rotation detected for %s", self.__filename)
 | 
			
		||||
			logSys.log(logging.MSG, "Log rotation detected for %s", self.__filename)
 | 
			
		||||
			self.__hash = myHash
 | 
			
		||||
			self.__ino = stats.st_ino
 | 
			
		||||
			self.__pos = 0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue