Logging utility for python