Tyk Log Data are missing in Centos-7

Hello, I have installed tyk in Red Hat (RHEL / CentOS7) (instructions from Red Hat (RHEL / CentOS) )
After installation i can see the the logs via journalctl but I notice there is no log data in /var/log/ as it mentioned at Tyk Documentation (Log Data). Also in tyk.conf i check and there is no field to define log_path etc. /var/log/tyk.log

any idea what i should do?

Hi,

How the logs are dealt with is dependant on the operating system and how its configured so the documentation is only able to be general in this case.

For RedHat derived systems which run systemd tyk behaves like a standard systemd started service with messages going to /var/log/messages (assuming default rsyslogd config) as well as being available through journalctl.

This isn’t under tyk’s control, since tyk only logs to stdout and stderr which is why there isn’t a log file option in the config.

There are options to control this in systemd. It might be helpful to have a look at these links

https://www.freedesktop.org/software/systemd/man/systemd.exec.html#StandardOutput=
https://www.freedesktop.org/software/systemd/man/systemd.exec.html#StandardError=

Perhaps an override with something like this would do what you want?

StandardOutput=file:/var/log/tyk-gateway.log
StandardError=inherit

Cheers,
Pete