diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig
index 36a3fb0be2..7a8fa53b5f 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig
+++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig
@@ -1,16 +1,18 @@
{% extends '@WebProfiler/Profiler/layout.html.twig' %}
+{% import _self as logger %}
+
{% block toolbar %}
{% if collector.counterrors or collector.countdeprecations %}
{% set icon %}
{% if collector.counterrors %}
- {% set statusColor = "red" %}
+ {% set status_color = "red" %}
{% else %}
- {% set statusColor = "yellow" %}
+ {% set status_color = "yellow" %}
{% endif %}
- {% set errorCount = collector.counterrors + collector.countdeprecations %}
- {{ errorCount }}
+ {% set error_count = collector.counterrors + collector.countdeprecations %}
+ {{ error_count }}
{% endset %}
{% set text %}
{% if collector.counterrors %}
@@ -35,9 +37,9 @@
Logs
{% if collector.counterrors or collector.countdeprecations %}
- {% set errorCount = collector.counterrors + collector.countdeprecations %}
+ {% set error_count = collector.counterrors + collector.countdeprecations %}
- {{ errorCount }}
+ {{ error_count }}
{% endif %}
@@ -56,7 +58,19 @@
@@ -70,15 +84,9 @@
{% if collector.logs %}
- {% for log in collector.logs if log.priority >= priority %}
+ {% for log in collector.logs if priority >= 0 and log.priority >= priority or priority < 0 and log.context.type|default(0) == priority %}
- {{ log.priorityName }} - {{ log.message }}
- {% if log.context is defined and log.context is not empty %}
-
-
- Context: {{ log.context|yaml_encode }}
-
- {% endif %}
+ {{ logger.display_message(loop.index, log) }}
{% else %}
No logs available for this priority.
@@ -90,3 +98,39 @@
{% endif %}
{% endblock %}
+
+
+{% macro display_message(log_index, log) %}
+ {% if constant('Symfony\\Component\\HttpKernel\\Debug\\ErrorHandler::TYPE_DEPRECATION') == log.context.type|default(0) %}
+ DEPRECATION - Deprecated call in {{ log.context.file|format_file(log.context.line) }}.
+ {% set id = 'sf-call-stack-' ~ log_index %}
+
+
+
+
+ {% for index, call in log.context.stack if index > 0 %}
+ {% if index == 1 %}
+
+ {% endif %}
+ {% if call.class is defined %}
+ {% set from = call.class|abbr_class ~ '::' ~ call.function|abbr_method() %}
+ {% elseif call.function is defined %}
+ {% set from = call.function|abbr_method %}
+ {% elseif call.file is defined %}
+ {% set from = call.file %}
+ {% else %}
+ {% set from = '-' %}
+ {% endif %}
+
+
Called from {{ call.file is defined and call.line is defined
+ ? call.file|format_file(call.line, from)
+ : from|raw
+ }}
+