error.html.php
2 years ago
exception.html.php
2 years ago
exception_full.html.php
2 years ago
logs.html.php
2 years ago
trace.html.php
2 years ago
traces.html.php
2 years ago
traces_text.html.php
2 years ago
logs.html.php
83 lines
| 1 | <table class="logs" data-filter-level="Emergency,Alert,Critical,Error,Warning,Notice,Info,Debug" data-filters> |
| 2 | <?php |
| 3 | $channelIsDefined = isset($logs[0]['channel']); |
| 4 | ?> |
| 5 | <thead> |
| 6 | <tr> |
| 7 | <th data-filter="level">Level</th> |
| 8 | <?php |
| 9 | if ($channelIsDefined) { |
| 10 | ?><th data-filter="channel">Channel</th><?php |
| 11 | } |
| 12 | ?> |
| 13 | <th class="full-width">Message</th> |
| 14 | </tr> |
| 15 | </thead> |
| 16 | |
| 17 | <tbody> |
| 18 | <?php |
| 19 | foreach ($logs as $log) { |
| 20 | if ($log['priority'] >= 400) { |
| 21 | $status = 'error'; |
| 22 | } elseif ($log['priority'] >= 300) { |
| 23 | $status = 'warning'; |
| 24 | } else { |
| 25 | $severity = 0; |
| 26 | if (($exception = $log['context']['exception'] ?? null) instanceof \ErrorException || $exception instanceof \Matomo\Dependencies\Symfony\Component\ErrorHandler\Exception\SilencedErrorContext) { |
| 27 | $severity = $exception->getSeverity(); |
| 28 | } |
| 29 | $status = \E_DEPRECATED === $severity || \E_USER_DEPRECATED === $severity ? 'warning' : 'normal'; |
| 30 | } |
| 31 | ?> |
| 32 | <tr class="status-<?php |
| 33 | echo $status; |
| 34 | ?>" data-filter-level="<?php |
| 35 | echo \strtolower($this->escape($log['priorityName'])); |
| 36 | ?>"<?php |
| 37 | if ($channelIsDefined) { |
| 38 | ?> data-filter-channel="<?php |
| 39 | echo $this->escape($log['channel']); |
| 40 | ?>"<?php |
| 41 | } |
| 42 | ?>> |
| 43 | <td class="text-small nowrap"> |
| 44 | <span class="colored text-bold"><?php |
| 45 | echo $this->escape($log['priorityName']); |
| 46 | ?></span> |
| 47 | <span class="text-muted newline"><?php |
| 48 | echo \date('H:i:s', $log['timestamp']); |
| 49 | ?></span> |
| 50 | </td> |
| 51 | <?php |
| 52 | if ($channelIsDefined) { |
| 53 | ?> |
| 54 | <td class="text-small text-bold nowrap"> |
| 55 | <?php |
| 56 | echo $this->escape($log['channel']); |
| 57 | ?> |
| 58 | </td> |
| 59 | <?php |
| 60 | } |
| 61 | ?> |
| 62 | <td> |
| 63 | <?php |
| 64 | echo $this->formatLogMessage($log['message'], $log['context']); |
| 65 | ?> |
| 66 | <?php |
| 67 | if ($log['context']) { |
| 68 | ?> |
| 69 | <pre class="text-muted prewrap m-t-5"><?php |
| 70 | echo $this->escape(\json_encode($log['context'], \JSON_PRETTY_PRINT | \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES)); |
| 71 | ?></pre> |
| 72 | <?php |
| 73 | } |
| 74 | ?> |
| 75 | </td> |
| 76 | </tr> |
| 77 | <?php |
| 78 | } |
| 79 | ?> |
| 80 | </tbody> |
| 81 | </table> |
| 82 | <?php |
| 83 |