From c59fbde74bb35fef9ab2c1f6b61d3357bd096b01 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 11 Sep 2017 12:10:03 +0200 Subject: [PATCH] Display the log context in the debug pages --- .../TwigBundle/Resources/views/Exception/logs.html.twig | 7 ++++++- .../Bundle/TwigBundle/Resources/views/exception.css.twig | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/logs.html.twig b/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/logs.html.twig index 02d2b546e8559..aa1e992edeeea 100644 --- a/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/logs.html.twig +++ b/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/logs.html.twig @@ -21,7 +21,12 @@ {{ log.channel }} {% endif %} - {{ log.message|format_log_message(log.context) }} + + {{ log.message|format_log_message(log.context) }} + {% if log.context ?? false %} +
{{ log.context|json_encode(constant('JSON_PRETTY_PRINT') b-or constant('JSON_UNESCAPED_UNICODE') b-or constant('JSON_UNESCAPED_SLASHES')) }}
+ {% endif %} + {% endfor %} diff --git a/src/Symfony/Bundle/TwigBundle/Resources/views/exception.css.twig b/src/Symfony/Bundle/TwigBundle/Resources/views/exception.css.twig index 9f12edece1e71..36d8365dd06c2 100644 --- a/src/Symfony/Bundle/TwigBundle/Resources/views/exception.css.twig +++ b/src/Symfony/Bundle/TwigBundle/Resources/views/exception.css.twig @@ -17,9 +17,11 @@ table { background: #FFF; border: 1px solid #E0E0E0; box-shadow: 0px 0px 1px rgb table th, table td { border: solid #E0E0E0; border-width: 1px 0; padding: 8px 10px; } table th { background-color: #E0E0E0; font-weight: bold; text-align: left; } +.m-t-5 { margin-top: 5px; } .hidden-xs-down { display: none; } .block { display: block; } .hidden { display: none; } +.prewrap { white-space: pre-wrap; } .nowrap { white-space: nowrap; } .newline { display: block; } .break-long-words { -ms-word-break: break-all; word-break: break-all; word-break: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; }