Added logging into databasefuncitons.
Commit