Fix instance where some items were being re-added due to lack of return. Also, implement some basic logging.

This commit is contained in:
blitzmann
2015-07-04 23:16:20 -04:00
parent 5991d19b3e
commit aaa60cbc14
2 changed files with 17 additions and 1 deletions

View File

@@ -32,7 +32,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