python redirect sys stdout to logging