container->router; // -- Get the log's file name $tag = $this->tag; $logFile = \Akeeba\Engine\Factory::getLog()->getLogFilename($tag); if (!@is_file($logFile) && @file_exists(substr($logFile, 0, -4))) { /** * Bad host: the log file akeeba.tag.log.php may not exist but the akeeba.tag.log does. */ $logFile = substr($logFile, 0, -4); } @ob_end_clean(); ?> ' . Text::sprintf('SOLO_LOG_ERR_LOGFILENOTEXISTS', $logFile) . '

'; } else { // Allright, let's load and render it $fp = fopen($logFile, "r"); if ($fp === FALSE) { // Oops! The log isn't readable?! echo '

' . Text::_('COM_AKEEBA_LOG_ERROR_UNREADABLE') . '

'; } else while (!feof($fp)) { $line = fgets($fp); if (!$line) return; $exploded = explode("|", $line, 3); unset($line); if (count($exploded) < 3) continue; switch (trim($exploded[0])) { case "ERROR": $fmtString = "["; break; case "WARNING": $fmtString = "["; break; case "INFO": $fmtString = "["; break; case "DEBUG": $fmtString = "["; break; default: $fmtString = "["; break; } $fmtString .= $exploded[1] . "] " . htmlspecialchars($exploded[2]) . ""; unset($exploded); echo $fmtString; unset($fmtString); } } ?>