Getting loki to log to a different file

Hi all,

I think I'm missing something obvious here, 

but how do I get Loki (and promtail) to output their log messages to custom files instead of syslog?

Hey @wallet72

Loki and Promtail will output their logs to stdout and stderr. You can redirect them by using a tool like tee.

loki -config.file=/my/config 2>&1 | tee -a /var/log/loki.log
HTH