method parseLine documentation in bbn\Parsers\Apache
function($st)
{
$ln = trim($st);
if (empty($ln)) {
return null;
}
$m = [];
if (preg_match(self::$err1, $ln, $m)) {
$in_lib = strpos('/'.$m[4], BBN_LIB_PATH) === 0;
return [
'date' => date('Y-m-d H:i:s', strtotime(str_replace('-', ' ', $m[1]))),
'type' => $m[2],
'error' => $m[3],
'file' => str_replace(
$in_lib ? BBN_LIB_PATH : BBN_APP_PATH,
$in_lib ? 'lib/' : 'app/',
'/'.$m[4]
),
'line' => $m[5],
];
}
if (preg_match(self::$err2, $ln, $m)) {
$in_lib = strpos('/'.$m[4], BBN_LIB_PATH) === 0;
return [
'date' => date('Y-m-d H:i:s', strtotime(str_replace('-', ' ', $m[1]))),
'type' => $m[2],
'error' => $m[3],
'file' => str_replace(
$in_lib ? BBN_LIB_PATH : BBN_APP_PATH,
$in_lib ? 'lib/' : 'app/',
'/'.$m[4]
),
'line' => $m[5],
];
}
if (preg_match(self::$err_line, $ln, $m)) {
$in_lib = strpos('/'.$m[3], BBN_LIB_PATH) === 0;
return [
'action' => Str::cut($m[2], 255),
'file' => str_replace(
$in_lib ? BBN_LIB_PATH : BBN_APP_PATH,
$in_lib ? 'lib/' : 'app/',
'/'.$m[3]
),
'line' => $m[4]
];
}
if (preg_match(self::$err_line2, $ln, $m)) {
$in_lib = strpos('/'.$m[1], BBN_LIB_PATH) === 0;
return [
'action' => Str::cut($m[3], 255),
'file' => str_replace(
$in_lib ? BBN_LIB_PATH : BBN_APP_PATH,
$in_lib ? 'lib/' : 'app/',
'/'.$m[1]
),
'line' => $m[2]
];
}
return null;
}
BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2025
BBN Solutions