Skip to content

Instantly share code, notes, and snippets.

@joet3ch
Created November 2, 2011 01:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joet3ch/1332582 to your computer and use it in GitHub Desktop.
Save joet3ch/1332582 to your computer and use it in GitHub Desktop.
use strict;
use File::Tail;
use Net::Syslog;
my $s=new Net::Syslog(Facility=>’local7′,Priority=>’System’,SyslogPort=>’514′,SyslogHost=>’10.0.0.5′);
my $log=File::Tail->new(’c:windowssystem32logfilesw3svc1www.log’);
while (defined(my $line=$log->read)) {
$s->send($line,Priority=>’system’);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment