Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit65d4ae0

Browse files
committed
feature#13324 [WebProfilerBundle] Improved page for logs (hason)
This PR was submitted for the 2.7 branch but it was merged into the 2.8 branch instead (closes#13324).Discussion----------[WebProfilerBundle] Improved page for logs| Q | A| ------------- | ---| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -*Before*![logs-before](https://cloud.githubusercontent.com/assets/288535/5661713/3942c530-972f-11e4-89cb-2e185a6d07ac.png)*After*![logs-after](https://cloud.githubusercontent.com/assets/288535/5661681/d02b50da-972e-11e4-96e8-0572428ba82f.png)Commits-------5fdc650 [WebProfilerBundle] Improved page for logs
2 parents4b71fe0 +5fdc650 commit65d4ae0

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

‎src/Symfony/Bridge/Monolog/Handler/DebugHandler.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public function getLogs()
3535
'priority' =>$record['level'],
3636
'priorityName' =>$record['level_name'],
3737
'context' =>$record['context'],
38+
'channel' =>isset($record['channel']) ?$record['channel'] :'',
3839
);
3940
}
4041

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

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,20 +87,30 @@
8787
</table>
8888

8989
{%ifcollector.logs %}
90-
<ulclass="alt">
90+
<table>
91+
<tr>
92+
<th>#</th>
93+
<th>Priority</th>
94+
<th>Channel</th>
95+
<th>Message and context</th>
96+
</tr>
97+
9198
{%setlog_loop_index=0 %}
9299
{%forlogincollector.logs %}
93100
{%setis_deprecation=log.context.levelisdefinedandlog.context.typeisdefinedand (constant('E_DEPRECATED')==log.context.typeorconstant('E_USER_DEPRECATED')==log.context.type) %}
94101
{%ifpriority=='-100'?is_deprecation:log.priority>=priority %}
95102
{%setlog_loop_index=log_loop_index+1 %}
96-
<liclass="{{cycle(['odd','even'],log_loop_index) }}{%iflog.context.screamisdefined %} scream{%elseiflog.priority>=400 %} error{%elseiflog.priority>=300oris_deprecation %} warning{%endif %}">
97-
{{ logger.display_message(loop.index,log,is_deprecation) }}
98-
</li>
103+
<trclass="{{cycle(['odd','even'],log_loop_index) }}{%iflog.context.screamisdefined %} scream{%elseiflog.priority>=400 %} error{%elseiflog.priority>=300oris_deprecation %} warning{%endif %}">
104+
<td>{{log_loop_index }}</td>
105+
<td>{{is_deprecation?'DEPRECATION':log.priorityName }}</td>
106+
<td>{{log.channelisdefined?log.channel }}</td>
107+
<td>{{ logger.display_message(loop.index,log,is_deprecation) }}</td>
108+
</tr>
99109
{%endif %}
100110
{%else %}
101-
<li><em>No logs available forthis priority.</em></li>
111+
<tr><tdcolspan="4"><em>No logs available for{{priority }} priority.</em></td></tr>
102112
{%endfor %}
103-
</ul>
113+
</table>
104114
{%else %}
105115
<p>
106116
<em>No logs available.</em>
@@ -114,7 +124,7 @@
114124
{%setstack=log.context.stack|default([]) %}
115125
{%setid='sf-call-stack-'~log_index %}
116126

117-
DEPRECATED -{{log.message }}
127+
{{log.message }}
118128

119129
{%ifstack %}
120130
<ahref="#"onclick="Sfjs.toggle('{{id }}', document.getElementById('{{id }}-on'), document.getElementById('{{id }}-off')); return false;">
@@ -144,7 +154,7 @@
144154
{%endif %}
145155
{%endfor %}
146156
{%else %}
147-
{{log.priorityName }} - {{log.message }}
157+
{{log.message }}
148158
{%iflog.contextisdefinedandlog.contextis notempty %}
149159
<br />
150160
<small>

‎src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ pre, code {
179179
width: 250px;
180180
margin-left: -100%;
181181
}
182-
#collector-contenttable td {
182+
table td {
183183
background-color: white;
184184
}
185185
h1 {
@@ -273,15 +273,15 @@ ul.alt li {
273273
ul.alt li.even {
274274
background: #f1f7e2;
275275
}
276-
ul.alt li.error {
276+
ul.alt li.error, tr.error td {
277277
background-color: #f66;
278278
margin-bottom: 1px;
279279
}
280-
ul.alt li.warning {
280+
ul.alt li.warning, tr.warning td {
281281
background-color: #ffcc00;
282282
margin-bottom: 1px;
283283
}
284-
ul.alt li.scream, ul.alt li.scream strong {
284+
ul.alt li.scream, ul.alt li.scream strong, tr.scream td, tr.scream strong {
285285
color: gray;
286286
}
287287
ul.sf-call-stack li {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp