add GA logging to main and service base calls

This commit is contained in:
sfaulds 2016-10-10 13:44:06 +11:00
parent e9be0ae64a
commit 64766bcb71
3 changed files with 15 additions and 2 deletions

View file

@ -21,6 +21,7 @@ sys.path.append(_BASE_LIB)
import loghandler
from service_entry import Service
from utils import settings
from ga_client import GoogleAnalytics
#################################################################################################
@ -41,6 +42,9 @@ if __name__ == "__main__":
# Start the service
service.service_entry_point()
except Exception as error:
ga = GoogleAnalytics()
errStrings = ga.formatException()
ga.sendEventData("Exception", errStrings[0], errStrings[1])
log.exception(error)
log.info("Forcing shutdown")
service.shutdown()