Can you configure Promtail to only send ERROR level logs?

I’m trying to stop Loki receiving certain error levels from promtail to limit the storage space I will need for the compressed logs. I only want to send logs that contain the string “ERROR”. Is this possible?

Usually the filtering for things like that is on the Loki side. Does your log allow for a separate error log?

I’m using log4j so I could just set it so it only logs at error level. However, if for any reason I want to log at a lower level than error I don’t to use up a lot of disc space storing those logs in Loki. Hence, wanting to limit what is sent.