logging to debug database.