added log encoding support