The program driver starts an external application and reads messages from the standard output (stdout) of the application.

Status

Architecture Status
x86 Works
ARM Works

How to Test

The program() source driver is mainly useful to receive log messages from daemons that accept incoming messages and convert them to log messages. To stimulate this, we will write a shell script and run it using program() driver.

Note: The script is started by the driver, and in case of a exit, it is restarted automatically.

Shell Script

#!/bin/bash
while true
do
    echo "Hi"
    sleep 1
done

Configuration File Used

@version: 3.31
@include "scl.conf"

source s_program {
    program("/Users/yash/Documents/test.sh");
};

destination console{
    file(/dev/stdout);
};

log {
    source(s_program);
    destination(console);
};

Proof

Program() Source Driver tested on macOS (x86)

Program() Source Driver tested on macOS (ARM)

Updated: