logging in python post