python logging redirect stdout to logger