add log to python