|
6 | 6 | {% if collector.counterrors or collector.countdeprecations or collector.countscreams %}
|
7 | 7 | {% set icon %}
|
8 | 8 | {% set status_color = collector.counterrors ? 'red' : collector.countdeprecations ? 'yellow' : '' %}
|
9 |
| - {% set error_count = collector.counterrors + collector.countdeprecations + collector.countscreams %} |
| 9 | + {% set error_count = collector.counterrors + collector.countdeprecations %} |
10 | 10 | {{ include('@WebProfiler/Icon/logger.svg') }}
|
11 | 11 | <span class="sf-toolbar-value">{{ error_count }}</span>
|
12 | 12 | {% endset %}
|
|
55 | 55 | {# sort collected logs in groups #}
|
56 | 56 | {% set deprecation_logs, debug_logs, info_and_error_logs, silenced_logs = [], [], [], [] %}
|
57 | 57 | {% for log in collector.logs %}
|
58 |
| - {% if log.context.level is defined and log.context.type is defined and log.context.type in [constant('E_DEPRECATED'), constant('E_USER_DEPRECATED')] %} |
| 58 | + {% if log.context.errorCount is defined and log.context.type is defined and log.context.type in ['E_DEPRECATED', 'E_USER_DEPRECATED'] %} |
59 | 59 | {% set deprecation_logs = deprecation_logs|merge([log]) %}
|
60 | 60 | {% elseif log.context.scream is defined and log.context.scream == true %}
|
61 | 61 | {% set silenced_logs = silenced_logs|merge([log]) %}
|
|
170 | 170 | {% macro render_log_message(category, log_index, log, is_deprecation = false) %}
|
171 | 171 | {{ log.message }}
|
172 | 172 |
|
| 173 | + {% if log.context.errorCount is defined and log.context.errorCount > 1 %} |
| 174 | + <span class="text-small text-bold">({{ log.context.errorCount }} times)</span> |
| 175 | + {% endif %} |
| 176 | + |
173 | 177 | {% if is_deprecation %}
|
174 |
| - {% set stack = log.context.stack|default([]) %} |
175 |
| - {% set stack_id = 'sf-call-stack-' ~ category ~ '-' ~ log_index %} |
| 178 | + {% set trace = log.context.trace|default([]) %} |
| 179 | + {% set trace_id = 'sf-call-trace-' ~ category ~ '-' ~ log_index %} |
176 | 180 |
|
177 |
| - {% if log.context.errorCount is defined %} |
178 |
| - <span class="text-small text-bold">({{ log.context.errorCount }} times)</span> |
179 |
| - {% endif %} |
180 | 181 |
|
181 |
| - {% if stack %} |
182 |
| - <button class="btn-link text-small sf-toggle" data-toggle-selector="#{{ stack_id }}" data-toggle-alt-content="Hide stack trace">Show stack trace</button> |
| 182 | + {% if trace %} |
| 183 | + <button class="btn-link text-small sf-toggle" data-toggle-selector="#{{ trace_id }}" data-toggle-alt-content="Hide stack trace">Show stack trace</button> |
183 | 184 | {% endif %}
|
184 | 185 |
|
185 |
| - {% for index, call in stack if index > 1 %} |
| 186 | + {% for index, call in trace if index > 1 %} |
186 | 187 | {% if index == 2 %}
|
187 |
| - <ul class="sf-call-stack hidden" id="{{ stack_id }}"> |
| 188 | + <ul class="sf-call-trace hidden" id="{{ trace_id }}"> |
188 | 189 | {% endif %}
|
189 | 190 |
|
190 | 191 | {% if call.class is defined %}
|
|
206 | 207 | {% endif %}
|
207 | 208 | </li>
|
208 | 209 |
|
209 |
| - {% if index == stack|length - 1 %} |
| 210 | + {% if index == trace|length - 1 %} |
210 | 211 | </ul>
|
211 | 212 | {% endif %}
|
212 | 213 | {% endfor %}
|
|
224 | 225 | <a class="btn-link text-small sf-toggle" data-toggle-selector="#{{ context_id }}" data-toggle-alt-content="Hide full context">Show full context</a>
|
225 | 226 |
|
226 | 227 | <div id="{{ context_id }}" class="context">
|
227 |
| - <pre>{{ context_dump }}</pre> |
| 228 | + {{ dump(log.context) }} |
228 | 229 | </div>
|
229 | 230 | {% else %}
|
230 | 231 | {{ context_dump }}
|
|
0 commit comments