Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
389c0e2b
Commit
389c0e2b
authored
Jul 10, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved log panel display.
parent
4ec0a61a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
13 deletions
+12
-13
Action.php
framework/yii/base/Action.php
+1
-1
InlineAction.php
framework/yii/base/InlineAction.php
+1
-1
LogPanel.php
framework/yii/debug/panels/LogPanel.php
+10
-11
No files found.
framework/yii/base/Action.php
View file @
389c0e2b
...
...
@@ -77,7 +77,7 @@ class Action extends Component
throw
new
InvalidConfigException
(
get_class
(
$this
)
.
' must define a "run()" method.'
);
}
$args
=
$this
->
controller
->
bindActionParams
(
$this
,
$params
);
Yii
::
info
(
'Running
"'
.
get_class
(
$this
)
.
'::run()" with parameters: '
.
var_export
(
$args
,
true
)
,
__METHOD__
);
Yii
::
info
(
'Running
action: '
.
get_class
(
$this
)
.
'::run()'
,
__METHOD__
);
if
(
Yii
::
$app
->
requestedParams
===
null
)
{
Yii
::
$app
->
requestedParams
=
$args
;
}
...
...
framework/yii/base/InlineAction.php
View file @
389c0e2b
...
...
@@ -46,7 +46,7 @@ class InlineAction extends Action
public
function
runWithParams
(
$params
)
{
$args
=
$this
->
controller
->
bindActionParams
(
$this
,
$params
);
Yii
::
info
(
"Running '"
.
get_class
(
$this
->
controller
)
.
'::'
.
$this
->
actionMethod
.
"()' with parameters: "
.
var_export
(
$args
,
true
)
,
__METHOD__
);
Yii
::
info
(
'Running action: '
.
get_class
(
$this
->
controller
)
.
'::'
.
$this
->
actionMethod
.
'()'
,
__METHOD__
);
if
(
Yii
::
$app
->
requestedParams
===
null
)
{
Yii
::
$app
->
requestedParams
=
$args
;
}
...
...
framework/yii/debug/panels/LogPanel.php
View file @
389c0e2b
...
...
@@ -26,26 +26,25 @@ class LogPanel extends Panel
public
function
getSummary
()
{
$output
=
array
();
$output
=
array
(
'<span class="label">'
.
count
(
$this
->
data
[
'messages'
])
.
'</span>'
);
$title
=
'Logged '
.
count
(
$this
->
data
[
'messages'
])
.
' messages'
;
$errorCount
=
count
(
Target
::
filterMessages
(
$this
->
data
[
'messages'
],
Logger
::
LEVEL_ERROR
));
if
(
$errorCount
)
{
$output
[]
=
'<span class="label label-important">'
.
$errorCount
.
'</span> '
.
(
$errorCount
>
1
?
'errors'
:
'error'
);
$output
[]
=
'<span class="label label-important">'
.
$errorCount
.
'</span>'
;
$title
.=
",
$errorCount
errors"
;
}
$warningCount
=
count
(
Target
::
filterMessages
(
$this
->
data
[
'messages'
],
Logger
::
LEVEL_WARNING
));
if
(
$warningCount
)
{
$output
[]
=
'<span class="label label-warning">'
.
$warningCount
.
'</span> '
.
(
$warningCount
>
1
?
'warnings'
:
'warning'
);
$output
[]
=
'<span class="label label-warning">'
.
$warningCount
.
'</span>'
;
$title
.=
",
$warningCount
warnings"
;
}
if
(
!
empty
(
$output
))
{
$log
=
implode
(
', '
,
$output
);
$url
=
$this
->
getUrl
();
return
<<<EOD
$log
=
implode
(
' '
,
$output
);
$url
=
$this
->
getUrl
();
return
<<<EOD
<div class="yii-debug-toolbar-block">
<a href="$url"
>
$log</a>
<a href="$url"
title="$title">Log:
$log</a>
</div>
EOD;
}
else
{
return
''
;
}
}
public
function
getDetail
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment