Search code examples
ruby-on-railssidekiqsystemd

When running Sidekiq via systemd, where are the logs?


The title of the question pretty much says it.

If it helps for some reason, here's my ExecStart directive:

ExecStart=/usr/local/bin/bundle exec sidekiq -e production

Solution

  • Systemd unit logs can be accessed with journalctl.

    Assuming that Sidekiq's unit name is sidekiq, you can get its logs with the following command:

    journalctl -u sidekiq
    

    You can also append -f to the command to continuously get new log entries.

    journalctl -u sidekiq -f
    

    Check journalctl --help for more useful options.