8000 bug #14286 [WebProfiler] Added deprecation message and original color… · symfony/symfony@0ea25a9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0ea25a9

Browse files
committed
bug #14286 [WebProfiler] Added deprecation message and original color back (WouterJ)
This PR was merged into the 2.7 branch. Discussion ---------- [WebProfiler] Added deprecation message and original color back For some reason, the deprecation message and its original yellow color were removed. This means that you don't know the error (without a stack, you would just see an empty bar) and they aren't easy to find anymore in a long list of logs (yeah, the filter can be used...). **Before** ![sf-logger-deprecation-before](https://cloud.githubusercontent.com/assets/749025/7062927/4094d5d4-dea2-11e4-80e2-c13a02d6d748.png) **After** ![sf-logger-deprecation-after](https://cloud.githubusercontent.com/assets/749025/7062930/475fc2b6-dea2-11e4-978f-0f18262f283c.png) | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- 773df8c Added deprecation message and original color back
2 parents 6c72165 + 773df8c commit 0ea25a9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
{% 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) %}
9494
{% if priority == '-100' ? is_deprecation : log.priority >= priority %}
9595
{% set log_loop_index = log_loop_index + 1 %}
96-
<li class="{{ cycle(['odd', 'even'], log_loop_index) }}{% if log.context.scream is defined %} scream{% elseif log.priority >= 400 %} error{% elseif log.priority >= 300 %} warning{% endif %}">
96+
<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 %}">
9797
{{ logger.display_message(loop.index, log, is_deprecation) }}
9898
</li>
9999
{% endif %}
@@ -114,6 +114,8 @@
114114
{% set stack = log.context.stack|default([]) %}
115115
{% set id = 'sf-call-stack-' ~ log_index %}
116116

117+
DEPRECATED - {{ log.message }}
118+
117119
{% if stack %}
118120
<a href="#" onclick="Sfjs.toggle('{{ id }}', document.getElementById('{{ id }}-on'), document.getElementById('{{ id }}-off')); return false;">
119121
<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">

0 commit comments

Comments
 (0)
0