grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026
{$mod_strings['LBL_SEARCH']} {$mod_strings['LBL_REG_EXP']}
{$mod_strings['LBL_IGNORE_SELF']}
EOQ;
define('PROCESS_ID', 1);
define('LOG_LEVEL', 2);
define('LOG_NAME', 3);
define('LOG_DATA', 4);
// bug 53041 - now that we are respecting file name suffixes for log files, we need to get the log file name properly
$config = SugarConfig::getInstance();
$ext = $config->get('logger.file.ext');
$logfile = $config->get('logger.file.name');
$log_dir = $config->get('log_dir');
$log_dir = $log_dir . (empty($log_dir)?'':'/');
$file_suffix = $config->get('logger.file.suffix');
$date_suffix = "";
if (!empty($file_suffix)) {
$date_suffix = "_" . date(str_replace("%", "", $file_suffix));
}
$logFile = $log_dir . $logfile . $date_suffix . $ext;
if (!file_exists($logFile)) {
die('No Log File');
}
$lastMatch = false;
$doaction =(!empty($_REQUEST['doaction']))?$_REQUEST['doaction']:'';
switch ($doaction) {
case 'mark':
echo "
';
while ($line = fgets($fp)) {
$line = filter_var($line, FILTER_SANITIZE_SPECIAL_CHARS);
//preg_match('/[^\]]*\[([0-9]*)\] ([a-zA-Z]+) ([a-zA-Z0-9\.]+) - (.*)/', $line, $result);
preg_match('/[^\]]*\[([0-9]*)\]/', $line, $result);
ob_flush();
flush();
if (empty($result) && $lastMatch) {
echo $line;
} else {
$lastMatch = false;
if (empty($result) || ($ignore_self &&$result[LOG_NAME] == $_SERVER['REMOTE_ADDR'])) {
} else {
if (empty($filter) || (!$reg_ex && substr_count($line, $filter) > 0) || ($reg_ex && preg_match($filter, $line))) {
$lastMatch = true;
echo $line;
}
}
}
}
echo '';
fclose($fp);
}
}