Add logger class defining a perIteration callback (close #28).