grafana / loki

Like Prometheus, but for logs.
https://grafana.com/loki
GNU Affero General Public License v3.0
23.98k stars 3.46k forks source link

Issues with utf-8 characters on logs #7777

Open joaoluchetti opened 1 year ago

joaoluchetti commented 1 year ago

Describe the bug Recently while exploring logs on Loki we observed issues with utf-8 characters, for example: "message":"Verificando hist\u00f3rico de assinaturas"

This makes it difficult to search entries that contain characters like "á, ó, ú, é" and others.

Is there anyway to solve this problem with promtail or Loki configuration?

To Reproduce Steps to reproduce the behavior:

  1. Run a simple query on Loki that matches some special characters like "á, ó, ú, é".

Expected behavior We expected to get the output logs as they are, instead we are getting logs with unicode encoding values.

Expected: "message":"Verificando **histórico** de assinaturas"

Loki Output: "message":"Verificando **hist\u00f3rico** de assinaturas"

Screenshots image

sweetpotatoman commented 1 year ago

How to solve this problem?

perestoronin commented 1 year ago

How to solve this problem?

I have same issue. Try swith "Prettry JSON" to ON to display utf-8 symbols instead \u

peterdk commented 4 months ago

Same issue, I have some checkmarks in my log output (✅︎), for quick visual checks, but they render as unicode blocks.

afbeelding

Also tried Pretty JSON option, but that did not affect it.

When I locally cat my log file, these checkmarks do appear.