added FileLine to error report

This commit is contained in:
Steffen Schröder 2014-05-03 22:54:42 +02:00
parent 34390f9f12
commit 43a1cd99b0
2 changed files with 4 additions and 4 deletions

View File

@ -22,8 +22,8 @@ if (function_exists('date_default_timezone_get') && function_exists('date_defaul
// Build log file name // Build log file name
$logFileName = ManiaControlDir . 'logs' . DIRECTORY_SEPARATOR; $logFileName = ManiaControlDir . 'logs' . DIRECTORY_SEPARATOR;
if (!is_dir($logFileName)) { if (!is_dir($logFileName) && !mkdir($logFileName)) {
mkdir($logFileName); echo "Couldn't create Logs Folder, please check the File Permissions!";
} }
$logFileName .= 'ManiaControl'; $logFileName .= 'ManiaControl';
if (LOG_NAME_USE_DATE) { if (LOG_NAME_USE_DATE) {

View File

@ -136,7 +136,7 @@ class ErrorHandler {
$message = $errorTag . ': ' . $errorString; $message = $errorTag . ': ' . $errorString;
$fileLine = $errorFile . ': ' . $errorLine; $fileLine = $errorFile . ': ' . $errorLine;
$traceMessage = $this->parseBackTrace(debug_backtrace()); $traceMessage = $this->parseBackTrace(debug_backtrace());
$logMessage = $message . PHP_EOL . ($userError ? $fileLine : $traceMessage); $logMessage = $message . PHP_EOL . $fileLine . PHP_EOL . $traceMessage;
logMessage($logMessage); logMessage($logMessage);
if ($this->reportErrors && !$userError) { if ($this->reportErrors && !$userError) {