I have installed an application name supervisor, which processes queue in real time, which better suits for my task then cron. for supervisor the recommended recommendation as per docs is like below. Code: [Unit] Description=Yii Queue Worker %I After=network.target # the following two lines only apply if your queue backend is mysql # replace this with the service that powers your backend After=mysql.service Requires=mysql.service [Service] User=www-data Group=www-data ExecStart=/usr/bin/php /var/www/my_project/yii queue/listen --verbose Restart=on-failure [Install] WantedBy=multi-user.target This is working fine. only issue is the logs for this is included in syslog. I want to know If I can add any directive to have a separate log file for this.
No that is different. I am looking for the queue/task it process. that is included in syslog. is there a way to have a separate file for that. The link you shared that logs about its own health.
For what? Some application? Usually each application has its own config, and may allow configuration of logging.
Hi Taleman, I am processing yii2-queue, where tasks are pushed to the queue. but to process that queue supervisor is used. Now in the queue the tasks are like making repeated requests to API. The details of those requests I can see in syslog. but I want that in a separate file.
If the yii script logs the messages to syslog, you'll need to configure it to do otherwise. If it's instead stdout/stderr of the command itself, the link @Thom posted explains how to configure it.