contribsys / faktory_worker_ruby

Faktory worker for Ruby
GNU Lesser General Public License v3.0
214 stars 31 forks source link

Add -L option output the log #53

Closed al3rez closed 3 years ago

al3rez commented 3 years ago

This is an issue when you're running the faktory-worker in a service cause you need the logs to live somewhere similar to Sidekiq.

Propsal:

bundle exec faktory-worker -L log/faktory.log
mperham commented 3 years ago

Nope. Modern daemons log to stdout and let the OS manage the log output location, rotation, etc. Logfiles are legacy.

mperham commented 3 years ago

https://www.freedesktop.org/software/systemd/man/daemon.html#New-Style%20Daemons

al3rez commented 3 years ago

Right now I'm running Faktory on Upstart

      description "Elastic Beanstalk Faktory Upstart Manager"

      start on runlevel [2345]
      stop on runlevel [!2345]

      respawn

      script
      exec /bin/bash <<"EOF"
        EB_SCRIPT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k script_dir)
        EB_SUPPORT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k support_dir)

        . $EB_SUPPORT_DIR/envvars-wrapper.sh
        . $EB_SCRIPT_DIR/use-app-ruby.sh

        cd $EB_APP_STAGING_DIR
        exec su -s /bin/bash -c "bundle exec faktory-worker" webapp
      EOF
      end script
al3rez commented 3 years ago

How I supposed to output the log from do you have any clues? I tried console log.

mperham commented 3 years ago

Upstart has been deprecated for 7+ years now, Ubuntu moved to systemd in 15.04. Can you use any other deployment platform or a more modern Linux?

If you have a service /etc/init/faktory-worker.service, Upstart will put its output in /var/log/upstart/faktory-worker.log.