Send logs to Grafana loki

How can I send my console logs or logs to grafana loki?

Here you go: Options reference

Hi @ned ,

I ran the test but didn’t observe anything on the Loki side. Any pre-requisite configuration should be placed before sending the logs to Loki. Also is there is way to define the log-output on the docker-compose like we define out in docker-compose like K6_OUT.

–log-output=loki=http://127.0.0.1:3100/loki/api/v1/push

Can’t help you with why you don’t see anything on the loki side, you’d have to debug that on your own :man_shrugging: But, as it shows in the link I shared in the previous message, you can configure the log output with the K6_LOG_OUTPUT environment variable.

1 Like