Display the log context in the debug pages

This commit is contained in:
Javier Eguiluz 2017-09-11 12:10:03 +02:00 committed by Fabien Potencier
parent b1b686081b
commit c59fbde74b
2 changed files with 8 additions and 1 deletions

View File

@ -21,7 +21,12 @@
{{ log.channel }}
</td>
{% endif %}
<td>{{ log.message|format_log_message(log.context) }}</td>
<td>
{{ log.message|format_log_message(log.context) }}
{% if log.context ?? false %}
<pre class="text-muted prewrap m-t-5">{{ log.context|json_encode(constant('JSON_PRETTY_PRINT') b-or constant('JSON_UNESCAPED_UNICODE') b-or constant('JSON_UNESCAPED_SLASHES')) }}</pre>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>

View File

@ -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; }