Write logs in the log file

HI Team,

Currently I am using below command to check TYK logs:
journalctl -u tyk-gateway

But I want to write the logs in the log file and setup rotation and retention policies, can you Please suggest how can we achieve this?

Please do suggest if we use journalctl command then how many days of logs we can see?

This link maybe of help arch linux - How to direct the journal output of certain units to a particular file? - Unix & Linux Stack Exchange

Please do suggest if we use journalctl command then how many days of logs we can see?

Not, sure as this is a linux environment question. However, this guide be be of assistance