python library logging best practice