Have separate log file

Discussion in 'ISPConfig 3 Priority Support' started by pawan, Dec 1, 2020.

  1. pawan

    pawan Member HowtoForge Supporter

    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.
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  3. pawan

    pawan Member HowtoForge Supporter

    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.
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    For what? Some application?
    Usually each application has its own config, and may allow configuration of logging.
     
  5. pawan

    pawan Member HowtoForge Supporter

    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.
     
  6. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    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.
     
  7. Taleman

    Taleman Well-Known Member HowtoForge Supporter

Share This Page