Moved the static logger into the method.