Skip to content

Instantly share code, notes, and snippets.

@ralph-tice
Last active December 22, 2015 22:59
Show Gist options
  • Save ralph-tice/6543615 to your computer and use it in GitHub Desktop.
Save ralph-tice/6543615 to your computer and use it in GitHub Desktop.
rsyslog testing
#!/usr/bin/perl
use Sys::Syslog qw( :DEFAULT setlogsock );
setlogsock('unix');
openlog('apache', 'cons', 'pid', 'local2');
while ($log = <STDIN>) {
syslog('notice', $log);
}
closelog
$ModLoad imuxsock # provides support for local system logging
$IncludeConfig /etc/rsyslog.d/*.conf
local2,local2.* /var/log/local2.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment