Added method to get last log entered by type