Can SparkGateway send logs to Linux Syslog?

You need to do some extra work to send it to syslog:

  1. On Spark Gateway side
    a. Create new file “” under /SparkGateway folder; (Copy the one from JRE/lib folder and modify it by appending the following lines at the end)
    .level= INFO
    handlers= java.util.logging.ConsoleHandler, com.agafua.syslog.SyslogHandler
    # Syslog logger
    com.agafua.syslog.SyslogHandler.transport = udp
    com.agafua.syslog.SyslogHandler.facility = local0
    com.agafua.syslog.SyslogHandler.port = 514
    com.agafua.syslog.SyslogHandler.hostname = vmuser-xubuntu1604
    b. add VM argument for command to start the gateway:

    2. On syslog server side (ubuntu)
    a. Edit  /etc/rsyslog.conf to comment-in (uncomment) the following two lines
    input(type=”imudp” port=”514″)
    b. Enter “/etc/rsyslog.d” directory, create a new file “60-java.conf” with content (file name can be anything meaningful):
    local0.* /var/log/gateway.log
    c. Restart syslog service by executing:
    sudo service rsyslog restart