1# The client writes a message to Sys::Syslog native method. 2# The syslogd writes into multiple files depending on hostname. 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 quick message appears only in one log file. 8 9use strict; 10use warnings; 11use Cwd; 12use Sys::Hostname; 13 14my $objdir = getcwd(); 15(my $host = hostname()) =~ s/\..*//; 16 17our %args = ( 18 syslogd => { 19 conf => <<"EOF", 20+nonexist 21*.* $objdir/file-0.log 22++$host 23*.* $objdir/file-1.log 24*.* $objdir/file-2.log 25+* 26*.* $objdir/file-3.log 27EOF 28 }, 29 multifile => [ 30 { loggrep => { get_testgrep() => 0 } }, 31 { loggrep => { get_testgrep() => 1 } }, 32 { loggrep => { get_testgrep() => 0 } }, 33 { loggrep => { get_testgrep() => 0 } }, 34 ], 35); 36 371; 38