|
82 | 82 | </tr>
|
83 | 83 | </table>
|
84 | 84 |
|
85 |
| - {% if collector.logs %} |
86 |
| - <ul class="alt"> |
| 85 | +{% if collector.logs %} |
| 86 | + <table> |
| 87 | + <tr> |
| 88 | + <th>#</th> |
| 89 | + <th>Priority</th> |
| 90 | + <th>Channel</th> |
| 91 | + <th>Message and context</th> |
| 92 | + </tr> |
| 93 | + |
87 | 94 | {% set log_loop_index = 0 %}
|
88 | 95 | {% for log in collector.logs %}
|
89 | 96 | {% set is_deprecation = log.context.level is defined and log.context.type is defined and (constant('E_DEPRECATED') == log.context.type or constant('E_USER_DEPRECATED') == log.context.type) %}
|
90 | 97 | {% if priority == '-100' ? is_deprecation : log.priority >= priority %}
|
91 | 98 | {% set log_loop_index = log_loop_index + 1 %}
|
92 |
| - <li class="{{ cycle(['odd', 'even'], log_loop_index) }}{% if log.context.scream is defined %} scream{% elseif log.priority >= 400 %} error{% elseif log.priority >= 300 or is_deprecation %} warning{% endif %}"> |
93 |
| - {{ logger.display_message(loop.index, log, is_deprecation) }} |
94 |
| - </li> |
| 99 | + <tr class="{{ cycle(['odd', 'even'], log_loop_index) }}{% if log.context.scream is defined %} scream{% elseif log.priority >= 400 %} error{% elseif log.priority >= 300 or is_deprecation %} warning{% endif %}"> |
| 100 | + <td>{{ log_loop_index }}</td> |
| 101 | + <td>{{ is_deprecation ? 'DEPRECATION' : log.priorityName }}</td> |
| 102 | + <td>{{ log.channel is defined ? log.channel }}</td> |
| 103 | + <td>{{ logger.display_message(loop.index, log, is_deprecation) }}</td> |
| 104 | + </tr> |
95 | 105 | {% endif %}
|
96 | 106 | {% else %}
|
97 |
| - <li><em>No logs available for this priority.</em></li> |
| 107 | + <tr><td colspan="4"><em>No logs available for {{ priority }} priority.</em></td></tr> |
98 | 108 | {% endfor %}
|
99 |
| - </ul> |
| 109 | + </table> |
100 | 110 | {% else %}
|
101 | 111 | <p>
|
102 | 112 | <em>No logs available.</em>
|
|
106 | 116 |
|
107 | 117 |
|
108 | 118 | {% macro display_message(log_index, log, is_deprecation) %}
|
| 119 | + {{ is_deprecation ? 'DEPRECATED' : log.priorityName }} - {{ log.message }} |
| 120 | + |
109 | 121 | {% if is_deprecation %}
|
110 | 122 | {% set stack = log.context.stack|default([]) %}
|
111 | 123 | {% set id = 'sf-call-stack-' ~ log_index %}
|
112 | 124 |
|
113 |
| - DEPRECATED - {{ log.message }} |
| 125 | + {{ log.message }} |
114 | 126 |
|
115 | 127 | {% if stack %}
|
116 | 128 | <a href="#" onclick="Sfjs.toggle('{{ id }}', document.getElementById('{{ id }}-on'), document.getElementById('{{ id }}-off')); return false;">
|
|
140 | 152 | {% endif %}
|
141 | 153 | {% endfor %}
|
142 | 154 | {% else %}
|
143 |
| - {{ log.priorityName }} - {{ log.message }} |
144 | 155 | {% if log.context is defined and log.context is not empty %}
|
145 | 156 | <br />
|
146 | 157 | <small>
|
|
0 commit comments