move logger inside, to avoid eager logger creation