removed level as a required database field in log function