Add optional logger instance to timer decorator.