Merge pull request #312 from blitzmann/dbCorruption

Fixes for database rot
This commit is contained in:
Ryan Holmes
2015-07-05 13:08:11 -04:00
17 changed files with 365 additions and 594 deletions

View File

@@ -28,7 +28,16 @@ gameDB = None
# TODO: move back to pyfa.py main loop
# We moved it here just to avoid rebuilding windows skeleton for now (any change to pyfa.py needs it)
import logging
logging.basicConfig()
import logging.handlers
format = '%(asctime)s %(name)-24s %(levelname)-8s %(message)s'
logging.basicConfig(format=format, level=logging.DEBUG)
handler = logging.handlers.RotatingFileHandler("log.txt", maxBytes=10000, backupCount=3)
formatter = logging.Formatter(format)
handler.setFormatter(formatter)
logging.getLogger('').addHandler(handler)
logging.info("Starting pyfa")
def defPaths():
global pyfaPath