using a log struct to store each log