container->router; // -- Get the log's file name $tag = $this->tag; $logName = \Akeeba\Engine\Factory::getLog()->getLogFilename($tag); if(!@file_exists($logName)) { // Oops! The log doesn't exist! echo '

' . Text::sprintf('SOLO_LOG_ERR_LOGFILENOTEXISTS', $logName).'

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

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

'; return; } echo "\n"; echo ""; while( !feof($fp) ) { $line = fgets( $fp ); if(!$line) return; $exploded = explode( "|", $line, 3 ); unset( $line ); $class = ''; switch( trim($exploded[0]) ) { case "ERROR": $fmtString = "ERROR"; $class = 'bg-danger'; break; case "WARNING": $fmtString = "WARNING"; $class = 'bg-warning'; break; case "INFO": $fmtString = "INFO"; $class = 'bg-info'; break; case "DEBUG": $fmtString = "DEBUG"; $class = 'text-muted'; break; default: $fmtString = ""; break; } echo '\n"; unset( $exploded ); unset( $fmtString ); } echo "
TypeTimeMessage
' . $fmtString . '' . $exploded[1] . '' . htmlspecialchars($exploded[2]) . "
"; }