cahnging log system to python logging