Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Improved the logger panel when the log context is very long #17852

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Show context as pseudo-PHP instead of JSON
  • Loading branch information
javiereguiluz committed Feb 22, 2016
commit f0779e1c78a7b4136953a2da58d19b8bc418a1b7
Original file line number Diff line number Diff line change
Expand Up @@ -213,18 +213,16 @@
{% else %}
{% if log.context is defined and log.context is not empty %}
{% set context_id = 'context-' ~ category ~ '-' ~ log_index %}
{% set context_as_string = log.context|json_encode(64 b-or 256)|replace({
'{"' : '{ "', '"}' : '" }', '":{' : '": {', '":"' : '": "', '","' : '", "'
}) %}
{% set context_dump = profiler_dump(log.context) %}

<div class="metadata">
<strong>Context</strong>: {{ context_as_string }}
<strong>Context</strong>: {{ context_dump }}

{% if context_as_string|length > 120 %}
{% if context_dump|length > 120 %}
<a class="btn-link text-small sf-toggle" data-toggle-selector="#{{ context_id }}" data-toggle-alt-content="Collapse context">Expand context</a>

<div id="{{ context_id }}" class="context">
<pre>{{ profiler_dump(log.context) }}</pre>
<pre>{{ context_dump }}</pre>
</div>
{% endif %}
</div>
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.