2010-09-03 18:26:59 +00:00
|
|
|
#!/usr/bin/env php
|
2010-02-19 01:40:38 +00:00
|
|
|
<?php
|
|
|
|
|
2010-02-27 14:44:38 +00:00
|
|
|
include("includes/defaults.inc.php");
|
2010-02-19 01:40:38 +00:00
|
|
|
include("config.php");
|
|
|
|
include("includes/syslog.php");
|
2010-02-25 01:52:32 +00:00
|
|
|
include("includes/common.php");
|
2010-02-19 01:40:38 +00:00
|
|
|
|
2011-03-15 15:27:14 +00:00
|
|
|
$i = "1";
|
2010-02-19 01:40:38 +00:00
|
|
|
|
2011-03-15 15:27:14 +00:00
|
|
|
$s = fopen('php://stdin','r');
|
|
|
|
while ($line = fgets($s))
|
|
|
|
{
|
|
|
|
list($entry['host'],$entry['facility'],$entry['priority'], $entry['level'], $entry['tag'], $entry['timestamp'], $entry['msg']) = explode("||", trim($line));
|
|
|
|
process_syslog($entry, 1);
|
|
|
|
unset($entry); unset($line);
|
|
|
|
$i++;
|
2010-02-19 01:40:38 +00:00
|
|
|
}
|
|
|
|
|
2011-03-15 15:27:14 +00:00
|
|
|
?>
|