fix logging encode error