17b30e940Sbluhm# The client writes a message to Sys::Syslog native method. 2c3c9e563Sbluhm# The client writes an additional message with local5 and err. 37b30e940Sbluhm# The syslogd writes it into a file and through a pipe and to tty. 4c3c9e563Sbluhm# The special message also goes to all users with wall *. 57b30e940Sbluhm# The syslogd passes it via UDP to the loghost. 67b30e940Sbluhm# The server receives the message on its UDP socket. 7*29e70a6fSbluhm# Find the message in client, file, pipe, console, user, syslogd, server log. 8*29e70a6fSbluhm# Check that the special message is in the user's tty log twice. 97b30e940Sbluhm 107b30e940Sbluhmuse strict; 117b30e940Sbluhmuse warnings; 127b30e940Sbluhmuse Sys::Syslog qw(:macros); 137b30e940Sbluhm 147b30e940Sbluhmour %args = ( 157b30e940Sbluhm client => { 167b30e940Sbluhm func => sub { 177b30e940Sbluhm my $self = shift; 187b30e940Sbluhm syslog(LOG_LOCAL5|LOG_ERR, "test message to all users"); 197b30e940Sbluhm write_log($self); 207b30e940Sbluhm }, 217b30e940Sbluhm }, 227b30e940Sbluhm syslogd => { 237b30e940Sbluhm conf => "local5.err\t*", 247b30e940Sbluhm }, 25*29e70a6fSbluhm user => { 267b30e940Sbluhm loggrep => { 277b30e940Sbluhm qr/Message from syslogd/ => 1, 287b30e940Sbluhm qr/syslogd-regress.* test message to all users/ => 2, 297b30e940Sbluhm }, 307b30e940Sbluhm }, 317b30e940Sbluhm); 327b30e940Sbluhm 337b30e940Sbluhm1; 34