Skip to content

Troubleshooting receive compressed logs

Why do that

  • You have found that you are receiving logs under an abnormal compressed format
  • The topology receiving the logs fails, probably raising unexpected errors

In the punchplatform, sometimes we should compress logs to address performance issues. If the logs are compressed but not properly decompressed, you may found some poorly formatted logs such as :

2018-11-19 11:29:49.393 STDIO [INFO] {
  "logs": {
    "log": "x�\\��N�0\f��<FΥjұM���2!�&q�B�uQ\u0013'j<�j��q�Q!r�e��~�W6�Ӡ���>���;\u001d��u̹\tK��\u000bPU\b�^�k�|ӫ\u0018(�٦ �uQV\fI�\u001f\u0016b)�v�⫆R���\u00102��\u0000�%��1\t4�dEA�40�9��7+Jj��y�:6\"D?�2�\u000b\u001e4��)�cɼV��j��k��ӂb\u001f���$o�d%\rd\u0000�2��\u0002ȶ�������\u000e��\u001fO�xK�����%�\u001e����O\f��n^M&���������E�~\u0000\u0000\u0000���&1:��ahfbn2\u001a\u001dT�\u000e�̼�"
  }
}

To fix the issue, you must decompress the logs in the spout receiving it. Add to your spout_settings :

"compression": true,