move logger retrieval to method