1aa580fcbSbluhm# The client writes a message to Sys::Syslog native method. 2aa580fcbSbluhm# The syslogd writes it into a file and through a pipe. 3aa580fcbSbluhm# The syslogd passes it via UDP to the loghost. 4aa580fcbSbluhm# The server receives the message on its UDP socket. 5aa580fcbSbluhm# Syslogc reads and clears the memory logs. 6aa580fcbSbluhm# Find the message in client, file, pipe, syslogd, server, syslogc log. 7aa580fcbSbluhm# Check that memory buffer has been cleared. 8aa580fcbSbluhm 9aa580fcbSbluhmuse strict; 10aa580fcbSbluhmuse warnings; 11aa580fcbSbluhm 12aa580fcbSbluhmour %args = ( 13aa580fcbSbluhm syslogd => { 14aa580fcbSbluhm memory => 1, 15aa580fcbSbluhm loggrep => { 16aa580fcbSbluhm qr/Accepting control connection/ => 2, 17aa580fcbSbluhm qr/ctlcmd 2/ => 1, 18*bb7ea376Sbluhm get_testgrep() => 1, 19aa580fcbSbluhm }, 20aa580fcbSbluhm }, 21aa580fcbSbluhm syslogc => [ { 22aa580fcbSbluhm options => ["-c", "memory"], 23aa580fcbSbluhm down => get_downlog(), 24aa580fcbSbluhm }, { 25aa580fcbSbluhm options => ["memory"], 26*bb7ea376Sbluhm loggrep => { get_testgrep() => 0 }, 27aa580fcbSbluhm } ], 28aa580fcbSbluhm); 29aa580fcbSbluhm 30aa580fcbSbluhm1; 31