Fix pyton 2.6 error in logging