Can we add syntax color to Logs module?


(Gaël Richier) #1

Hello everybody !

I'll like to know if we can set color syntax for log through logs module ?
Example for syslog or auth log. (Error => RED / WARNING => ORANGE ....)

Thanks


(Felix Stürmer) #2

Hi @Gael_RICHIER,

thank you for that suggestion. What criteria/fields would be most useful to determine the color from in your use-case? The type? The log level?


(Gaël Richier) #3

Hi @weltenwort,

For me, it will be great by log level field.
But I think more generally with a regular expression, if a specific field contain a pattern.
Ex : for authentification logs if field "auth.status" contain 'failed' the line could be red .


(Felix Stürmer) #4

That makes sense, thank you. I have created a feature request to track this topic. Please feel free to follow its progress and to add further details about your use-case as comments on the issue.