modifying to accepted a logger in the construct