Add some key logging for database information.
This commit is contained in:
@@ -27,7 +27,9 @@ from eos import config
|
|||||||
from logbook import Logger
|
from logbook import Logger
|
||||||
|
|
||||||
pyfalog = Logger(__name__)
|
pyfalog = Logger(__name__)
|
||||||
|
pyfalog.info("Initializing database")
|
||||||
|
pyfalog.info("Gamedata connection: {0}", config.gamedata_connectionstring)
|
||||||
|
pyfalog.info("Saveddata connection: {0}", config.saveddata_connectionstring)
|
||||||
|
|
||||||
class ReadOnlyException(Exception):
|
class ReadOnlyException(Exception):
|
||||||
pass
|
pass
|
||||||
@@ -85,8 +87,10 @@ from eos.db.saveddata.queries import *
|
|||||||
# If using in memory saveddata, you'll want to reflect it so the data structure is good.
|
# If using in memory saveddata, you'll want to reflect it so the data structure is good.
|
||||||
if config.saveddata_connectionstring == "sqlite:///:memory:":
|
if config.saveddata_connectionstring == "sqlite:///:memory:":
|
||||||
saveddata_meta.create_all()
|
saveddata_meta.create_all()
|
||||||
|
pyfalog.info("Running database out of memory.")
|
||||||
|
|
||||||
|
|
||||||
def rollback():
|
def rollback():
|
||||||
with sd_lock:
|
with sd_lock:
|
||||||
|
pyfalog.warning("Session rollback triggered.")
|
||||||
saveddata_session.rollback()
|
saveddata_session.rollback()
|
||||||
|
|||||||
Reference in New Issue
Block a user