Hi is it possible to change the color of the Loki logs table?
What I want to do is to change the color of Info from green to blue any hints about that?
Greetings
Ashketchup
Hi is it possible to change the color of the Loki logs table?
What I want to do is to change the color of Info from green to blue any hints about that?
Greetings
Ashketchup
Hey @ashketchup92
Did you try the āOverridesā option?
Yes but it isnĀ“t possible either there. What I do for now is to use the same color in my charts as in my logs panel. But I wanted to style my dashboards more colorfuly
Can you give us a little more details of what you have and what you are expecting?
Since you want visual effect please share screenshot of your actual dashboard.
It seems to be that Grafana Loki has a default color-mapping for loglevels like error=red, info=green, warn=orange. I would like to change that. But in the Logi Logs Panel there is no option to override these values.
What am I expecting is that I can freely choose the coloring of the loglevel color:
Hey @ashketchup92
Thereās a workarround but it might not suit youā¦
If you are able to fetch the different logs in a variable, and more: to fetch each different type (error, info and warn) in different variable, you can use the Text Panel to show the data.
For example:
<div style="color: red;">${log-error}</div>
<div style="color: red;">${log-warn}</div>
<div style="color: red;">${log-info}</div>
But this solution sort the logs by type and not by dateā¦
Maybe playing with the code section could allow you do to better?
Iām still searching for a better solution.
Regards
Why donāt you convert the log panel into a table?
Then you have all the options you want.
Wouldnāt that be a solution?
Jo
I am trying to do the same, the table option is not really a solution because you lose the ability to see the full json content of the logs.
Same issue here, also I tried with transformation, but it does not make the job
I also tried that, but it isnāt a option in my case . I hope theyāll do an improvement there. Would be nice to be more flexibel with the design of Loki logs.
request it as a customizable feature in grafana github
another option is to change the code and build it yourself to the color you want.
butā¦ is it so a great challenge to add some styling to the log widget? I think coloring the line depending on the log level is nothing special
probably not. but there could be other priorities. if you feel that this is not so great of a challenge why not contribute code that allows for that?