|
87 | 87 | </table> |
88 | 88 |
|
89 | 89 | {% if collector.logs %} |
90 | | - <ul class="alt"> |
91 | | - {% for log in collector.logs if priority >= 0 and log.priority >= priority or priority < 0 and log.context.type|default(0) == priority %} |
92 | | - <li class="{{ cycle(['odd', 'even'], loop.index) }}{% if log.priority >= 400 %} error{% elseif log.priority >= 300 %} warning{% endif %}{% if log.context.scream is defined %} scream{% endif %}"> |
93 | | - {{ logger.display_message(loop.index, log) }} |
94 | | - </li> |
| 90 | + <table> |
| 91 | + <tr> |
| 92 | + <th>#</th> |
| 93 | + <th>Priority</th> |
| 94 | + <th>Channel</th> |
| 95 | + <th>Message and context</th> |
| 96 | + </tr> |
| 97 | + {% for i, log in collector.logs if priority >= 0 and log.priority >= priority or priority < 0 and log.context.type|default(0) == priority %} |
| 98 | + <tr class="{% if log.priority >= 400 %}error{% elseif log.priority >= 300 %}warning{% endif %}{% if log.context.scream is defined %}scream{% endif %}"> |
| 99 | + <td>{{ i + 1 }}</td> |
| 100 | + <td> |
| 101 | + {%- if log.context.type is defined and (constant('E_DEPRECATED') == log.context.type or constant('E_USER_DEPRECATED') == log.context.type) -%} |
| 102 | + DEPRECATION |
| 103 | + {%- else -%} |
| 104 | + {{ log.priorityName }} |
| 105 | + {%- endif -%} |
| 106 | + </td> |
| 107 | + <td>{{ log.channel is defined ? log.channel }}</td> |
| 108 | + <td>{{ logger.display_message(loop.index, log) }}</td> |
| 109 | + </tr> |
95 | 110 | {% else %} |
96 | | - <li><em>No logs available for this priority.</em></li> |
| 111 | + <tr><td colspan="4"><em>No logs available for {{ priority }} priority.</em></td></tr> |
97 | 112 | {% endfor %} |
98 | | - </ul> |
| 113 | + </table> |
99 | 114 | {% else %} |
100 | 115 | <p> |
101 | 116 | <em>No logs available.</em> |
|
105 | 120 |
|
106 | 121 |
|
107 | 122 | {% macro display_message(log_index, log) %} |
108 | | - {% if 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) %} |
109 | | - DEPRECATION - {{ log.message }} |
| 123 | + {% if log.context.stack is defined and log.context.type is defined and (constant('E_DEPRECATED') == log.context.type or constant('E_USER_DEPRECATED') == log.context.type) %} |
| 124 | + {{ log.message }} |
110 | 125 | {% set id = 'sf-call-stack-' ~ log_index %} |
111 | 126 | <a href="#" onclick="Sfjs.toggle('{{ id }}', document.getElementById('{{ id }}-on'), document.getElementById('{{ id }}-off')); return false;"> |
112 | 127 | <img class="toggle" id="{{ id }}-off" alt="-" src="data:image/gif;base64,R0lGODlhEgASAMQSANft94TG57Hb8GS44ez1+mC24IvK6ePx+Wa44dXs92+942e54o3L6W2844/M6dnu+P/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABIALAAAAAASABIAQAVCoCQBTBOd6Kk4gJhGBCTPxysJb44K0qD/ER/wlxjmisZkMqBEBW5NHrMZmVKvv9hMVsO+hE0EoNAstEYGxG9heIhCADs=" style="display:none"> |
|
133 | 148 | {% endif %} |
134 | 149 | {% endfor %} |
135 | 150 | {% else %} |
136 | | - {{ log.priorityName }} - {{ log.message }} |
| 151 | + {{ log.message }} |
137 | 152 | {% if log.context is defined and log.context is not empty %} |
138 | 153 | <br /> |
139 | 154 | <small> |
|
0 commit comments