Syslog Example

This example illustrates how to configure Jobly to send all logger events to a local or remote syslog.

Enabling syslog UDP connection

Note that for this to work, your syslog must be configured to accept UDP connections.

Edit /etc/rsyslog.conf and uncomment these lines:

# provides UDP syslog reception
input(type="imudp" port="514")


Jobly.configure do |config|
# Log to local syslog and use the system name `jobly` and tag `demo`
config.log = "syslog://jobly:demo@"
config.logger.level = Logger::INFO

Commands to Try

cd examples/syslog
# Install additional gem dependencies
bundle install
# Start watching the syslog
sudo tail -f /var/log/syslog
# Start both the server and the worker
foreman start
# Send jobs from the command line to the API
jobly send Hello