Implemented python logging