Logging for python