Code used to parse the logs