Refactors access to logger