Pull logging out into it's own class.