-
-
Notifications
You must be signed in to change notification settings - Fork 221
Expand file tree
/
Copy pathfirelogger.php
More file actions
45 lines (29 loc) · 694 Bytes
/
firelogger.php
File metadata and controls
45 lines (29 loc) · 694 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
declare(strict_types=1);
require __DIR__ . '/../src/tracy.php';
use Tracy\Debugger;
$arr = [10, 20, ['key1' => 'val1', 'key2' => true]];
// will show in FireLogger
Debugger::fireLog('Hello World');
Debugger::fireLog($arr);
function first($arg1, $arg2)
{
second(true, false);
}
function second($arg1, $arg2)
{
third([1, 2, 3]);
}
function third($arg1)
{
throw new Exception('The my exception', 123);
}
try {
first(10, 'any string');
} catch (Throwable $e) {
Debugger::fireLog($e);
}
?>
<!DOCTYPE html><link rel="stylesheet" href="assets/style.css">
<h1>Tracy: FireLogger demo</h1>
<p>How to <a href="https://tracy.nette.org/#toc-firelogger">enable FireLogger</a>?</p>