Changeset 329 for administrace/process_log.php
- Timestamp:
- Apr 9, 2008, 4:48:09 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
administrace/process_log.php
r320 r329 1 1 <?php 2 2 3 chdir('/var/www/wow/administrace/'); 3 4 include('global.php'); 4 5 5 6 $Content = file_get_contents($StdOutLogFile); 6 7 $Lines = explode("\n", $Content); 8 $Content = ''; // Free unused memory 7 9 8 10 // Separate information from log file … … 15 17 $Backtrace = array_slice($Lines, $Line, count($Lines) - $Line); // Assume rest of file to be backtrace 16 18 $Backtrace = addslashes(implode("\n", $Backtrace)); 19 $Lines = ''; 17 20 18 $Log = array_slice($Lines, 0, $Line); 19 $Log = addslashes(implode("\n", $Log)); 20 21 $ErrorLog = addslashes(file_get_contents($ErrOutLogFile)); 21 //$Log = array_slice($Lines, 0, $Line); 22 //$Log = addslashes(implode("\n", $Log)); 22 23 23 24 // Get used database version from database … … 40 41 // Insert data in separate query to partly avoid too long query packet error 41 42 $Database->query('UPDATE `debug` SET Backtrace="'.$Backtrace.'" WHERE Id='.$InsertId); 42 echo($Database->error); 43 $Backtrace = ''; 44 //echo($Database->error); 45 $Log = addslashes(file_get_contents($MangosLogFile)); 43 46 $Database->query('UPDATE `debug` SET Log="'.$Log.'" WHERE Id='.$InsertId); 44 echo($Database->error); 45 $Database->query('UPDATE `debug` SET ErrorLog="'.$ErrorLog.'" WHERE Id='.$InsertId); 46 echo($Database->error); 47 //echo($Database->error); 48 $Log = addslashes(file_get_contents($ErrOutLogFile)); 49 $Database->query('UPDATE `debug` SET ErrorLog="'.$Log.'" WHERE Id='.$InsertId); 50 //echo($Database->error); 51 $Log = addslashes(file_get_contents($MangosDbErrorsLogFile)); 52 $Database->query('UPDATE `debug` SET DbErrors="'.$Log.'" WHERE Id='.$InsertId); 53 //echo($Database->error); 47 54 48 55 // Clear log files 56 unlink($MangosLogFile); 49 57 unlink($StdOutLogFile); 50 58 unlink($ErrOutLogFile); 59 unlink($MangosDbErrorsLogFile); 51 60 52 61 ?>
Note:
See TracChangeset
for help on using the changeset viewer.