...
"; $collapsibleClose = "
"; $outputText = ""; $outputTextErrors = array(); $outputTextWarnings = array(); $linesAdded = 0; $isCollapsed = true; function e($text) { if (empty($text)) { return false; } global $printedarray, $global, $mysqlPass, $outputText, $outputTextErrors, $outputTextWarnings, $collapsibleOpen, $collapsibleClose, $linesAdded, $isCollapsed; $uniqid = ""; $class = ""; $collapsible = true; $uniqid = uniqid(); if ( preg_match("/(AVideoLog::SECURITY)/", $text, $matches) || preg_match("/(Prepare failed)/i", $text, $matches) || preg_match("/(AVideoLog::ERROR)/", $text, $matches) || preg_match("/(fatal)/i", $text, $matches)) { $outputTextErrors[] = array($uniqid, $text, $matches[1]); $class = "terminal-alert terminal-alert-error "; $style = "background-color: #A00; color:#FFF;font-weight: bold;"; $collapsible = false; } else if (preg_match("/(PHP Warning)/i", $text, $matches)) { $class = "terminal-alert terminal-alert-primary"; $outputTextWarnings[] = array($uniqid, $text, $matches[1]); $collapsible = false; } else if (preg_match("/PHP Notice/", $text)) { $class = "logNotice"; } else if (preg_match("/(AVideoLog::WARNING)/", $text, $matches) || preg_match("/AVideoLog::DEBUG/", $text)) { $class = "logDebug"; } if ($collapsible) { $log = preg_replace("/^[^\]]+/", "", $text); if (!empty($log)) { if (in_array($log, $printedarray)) { $class = "logIgnore"; } $printedarray[] = $log; } } $removeLinesWithWords = array('password', 'recoverPass', 'pass'); foreach ($removeLinesWithWords as $value) { if (preg_match("/{$value}/i", $text)) { $text = preg_replace("/[^ ]/", "*", $text) . " - {$value}"; break; } } $text = preg_replace("/[^ ]+@[^ ]+/i", "myemail@mydomain.com", $text); $text = htmlentities($text); if ($collapsible && !$isCollapsed) { $outputText .= $collapsibleOpen; $isCollapsed = true; } if (!$collapsible && $isCollapsed) { if ($linesAdded === 0) { $outputText = ""; } else { $outputText .= $collapsibleClose; } $isCollapsed = false; } if (!$collapsible && !$isCollapsed) { } $linesAdded++; $outputText .= "
" . "#{$linesAdded} {$text}" . "
" . PHP_EOL; return true; } if (empty($global['logfile'])) { die("Log variable does not exists"); } if (!file_exists($global['logfile'])) { die("you may have problems on the write permission for the log file"); } $lines = tail($global['logfile'], 5000, true, true); $lines = array_reverse($lines); foreach ($lines as $key => $line) { if (empty($line[0])) { unset($line[$key]); } else { break; } } $outputText .= $collapsibleOpen; foreach ($lines as $line) { e($line[0]); } $outputText .= $collapsibleClose; ?> <?php echo __("Logs") . " " . date("Y-M-d H:i:s") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?>
If you have a problem with your installation, feel free to share this log information on GitHub. In this log, we hide all the sensitive information from your log, but it still very helpful for finding issues.
#{$count} - {$value[2]}"; ?>

#{$count} - {$value[2]}"; } ?>