fix log encoding