Filtering out warning level logs in grafana-loki using specific method

Team, is there a way in grafana-loki to filter out warning level logs?

Hi
I don’t know what you situation is exactly about, but with quering Loki you can include or exclude a lot of things.
https://grafana.com/docs/loki/latest/query/log_queries/ can help you with that.

If loglevel is an attribute, then you can add something like loglevel !=“warning”, but that depends on your situation.

if you see, in grafana, it automatically detects error logs with red line, i want to know is there any option where i can print only those logs

actually without line filters

As far as I know the UI colors the line automatically if there is something like ‘Error’ in the text, not perse based on attribute data.

If you want to only show these you can add a filter like this to you query: |~ "Error|ERROR|Severe|SEVERE"