Skip to content

Commit

Permalink
压缩日志存储
Browse files Browse the repository at this point in the history
  • Loading branch information
breath-co2 committed Aug 5, 2013
1 parent 51eb16c commit c7c5a53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/view-error500-log
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ else

if (is_file($file))
{
$data = @unserialize(file_get_contents($file));
$data = @unserialize(gzuncompress(base64_decode(file_get_contents($file))));
if ($data)
{
$obj = $data['trace'];
Expand Down
2 changes: 1 addition & 1 deletion core/classes/core.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,7 @@ public static function show_500($msg = null)
$trace_array['use_time'] = microtime(1) - START_TIME;
$trace_array['trace'] = $trace_obj;

$trace_data = serialize($trace_array);
$trace_data = base64_encode(gzcompress(serialize($trace_array), 9));
unset($trace_array);

$view->error_saved = true;
Expand Down

0 comments on commit c7c5a53

Please sign in to comment.