Skip to content

Commit

Permalink
- Debug: improved FirePHP integration
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed May 4, 2009
1 parent a35ddcd commit d1f1923
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Nette/Debug.php
Expand Up @@ -809,7 +809,13 @@ public static function fireLog($message, $priority = self::LOG, $label = NULL)
'File' => $message->getFile(),
'Line' => $message->getLine(),
'Trace' => $message->getTrace(),
'Type' => '',
'Function' => '',
);
foreach ($message['Trace'] as & $row) {
if (empty($row['file'])) $row['file'] = '?';
if (empty($row['line'])) $row['line'] = '?';
}
} elseif ($priority === self::GROUP_START) {
$label = $message;
$message = NULL;
Expand Down
2 changes: 1 addition & 1 deletion tests/Debug/ref/test.firefox.php.html
Expand Up @@ -7,7 +7,7 @@
5 => string(68) "X-Wf-nette-1-1-n5: |[{"Type":"ERROR","Label":null},"Error message"]|"
6 => string(86) "X-Wf-nette-1-1-n6: |[{"Type":"LOG","Label":null},[10,20,{"key1":"val1","key2":true}]]|"
7 => string(215) "X-Wf-nette-1-1-n7: |[{"Type":"TABLE","Label":"2 SQL queries took 0.06 seconds"},[["SQL Statement","Time","Result"],["SELECT * FROM foo","0.02",["field1","field2"]],["SELECT * FROM bar","0.04",["field1","field2"]]]]|"
8 => string(535) "X-Wf-nette-1-1-n8: |[{"Type":"TRACE","Label":null},{"Class":"Exception","Message":"The my exception","File":"D:\\Web\\nette\\_trunk\\tests\\Debug\\test.firefox.php","Line":51,"Trace":[{"file":"D:\\Web\\nette\\_trunk\\tests\\Debug\\test.firefox.php","line":45,"function":"third","args":[[1,2,3]]},{"file":"D:\\Web\\nette\\_trunk\\tests\\Debug\\test.firefox.php","line":38,"function":"second","args":[true,false]},{"file":"D:\\Web\\nette\\_trunk\\tests\\Debug\\test.firefox.php","line":55,"function":"first","args":[10,"any string"]}]}]|"
8 => string(559) "X-Wf-nette-1-1-n8: |[{"Type":"TRACE","Label":null},{"Class":"Exception","Message":"The my exception","File":"D:\\Web\\nette\\_trunk\\tests\\Debug\\test.firefox.php","Line":51,"Trace":[{"file":"D:\\Web\\nette\\_trunk\\tests\\Debug\\test.firefox.php","line":45,"function":"third","args":[[1,2,3]]},{"file":"D:\\Web\\nette\\_trunk\\tests\\Debug\\test.firefox.php","line":38,"function":"second","args":[true,false]},{"file":"D:\\Web\\nette\\_trunk\\tests\\Debug\\test.firefox.php","line":55,"function":"first","args":[10,"any string"]}],"Type":"","Function":""}]|"
9 => string(67) "X-Wf-nette-2-1-n1: |{"My var":[10,20,{"key1":"val1","key2":true}]}|"
10 => string(94) "X-Wf-nette-Plugin-1: http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.2.0"
11 => string(93) "X-Wf-nette-Structure-1: http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1"
Expand Down

0 comments on commit d1f1923

Please sign in to comment.