logger is now passed in the constructor.