Adding optional logger integration