Redid logging snippets for python