Thanks kicken,
That does capture the data, but it's just a blob of info., however I need to feed it into the formatted table that Barand suggested for it to be meaningful/readable.
<?php
exec('cat /cci/support/log/page.log | grep FETAL', $output);
foreach ($output as $line){
echo split_row($line);
}
function split_row($str)
{
$date = substr($str,0,28);
$str = substr($str,29);
$arr = explode(' -- ', $str);
$err = $arr[0];
$words = explode(' ', $arr[1]);
$code = array_shift($words);
$msg = join(' ', $words);
return "<tr><td>$date</td><td>$code</td><td>$msg</td><td>$err</td></tr>\n";
}
$lines = file('/usr/tmp/pagelog.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$logdata = '';
foreach ($lines as $line) {
$logdata .= split_row($line);
}
?>
<html>
<head>
<title>Log sample</title>
</head>
<body>
<table border='1' cellpadding='3'>
<tr><th>Date</th><th>Code</th><th>Message</th><th>Error</th></tr>
<?=$logdata?>
</table>
</body>
</html>