1# The client writes a message in UDP packet to 127.0.0.1. 2# The syslogd writes into multiple files depending on IPv4-Address. 3# The syslogd writes it into a file and through a pipe. 4# The syslogd passes it via UDP to the loghost. 5# The server receives the message on its UDP socket. 6# Find the message in client, file, pipe, syslogd, server log. 7# Check that the message appears in the correct log files. 8 9use strict; 10use warnings; 11use Socket; 12 13our %args = ( 14 client => { 15 connect => { domain => AF_INET, addr => "127.0.0.1", port => 514 }, 16 }, 17 syslogd => { 18 options => ["-n", "-U", "127.0.0.1:514"], 19 conf => <<'EOF', 20+localhost 21*.* $objdir/file-0.log 22+127.0.0.1 23*.* $objdir/file-1.log 24+::1 25*.* $objdir/file-2.log 26+$host 27*.* $objdir/file-3.log 28+* 29*.* $objdir/file-4.log 30EOF 31 }, 32 multifile => [ 33 { loggrep => { get_testgrep() => 0 } }, 34 { loggrep => { get_testgrep() => 1 } }, 35 { loggrep => { get_testgrep() => 0 } }, 36 { loggrep => { get_testgrep() => 0 } }, 37 { loggrep => { get_testgrep() => 1 } }, 38 ], 39); 40 411; 42