added log rotation
This commit is contained in:
		
							parent
							
								
									798f7e4b65
								
							
						
					
					
						commit
						7844a44a74
					
				| @ -5,6 +5,7 @@ results available via API Call | ||||
| from aiohttp import web | ||||
| import copy | ||||
| import logging | ||||
| from logging.handlers import RotatingFileHandler | ||||
| import threading | ||||
| from time import sleep | ||||
| import json | ||||
| @ -72,7 +73,8 @@ def start(): | ||||
|     logging.basicConfig(level=logging.INFO, | ||||
|                         format='%(asctime)s %(levelname)s %(funcName)s %(message)s', | ||||
|                         handlers=[logging.FileHandler(LOG_FILE, mode='a'), | ||||
|                                   logging.StreamHandler()]) | ||||
|                                   logging.StreamHandler(), | ||||
|                                   RotatingFileHandler(LOG_FILE, maxBytes=10000, backupCount=3)]) | ||||
| 
 | ||||
|     logging.info("Trying to load diff file from disk") | ||||
|     try: | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user