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
629ed629
Commit
629ed629
authored
Apr 10, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
start debug logging only if debug runs when bootstrap.
parent
a0636168
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
Module.php
extensions/debug/Module.php
+3
-1
No files found.
extensions/debug/Module.php
View file @
629ed629
...
@@ -71,8 +71,8 @@ class Module extends \yii\base\Module implements BootstrapInterface
...
@@ -71,8 +71,8 @@ class Module extends \yii\base\Module implements BootstrapInterface
public
function
init
()
public
function
init
()
{
{
parent
::
init
();
parent
::
init
();
$this
->
dataPath
=
Yii
::
getAlias
(
$this
->
dataPath
);
$this
->
dataPath
=
Yii
::
getAlias
(
$this
->
dataPath
);
$this
->
logTarget
=
Yii
::
$app
->
getLog
()
->
targets
[
'debug'
]
=
new
LogTarget
(
$this
);
// merge custom panels and core panels so that they are ordered mainly by custom panels
// merge custom panels and core panels so that they are ordered mainly by custom panels
if
(
empty
(
$this
->
panels
))
{
if
(
empty
(
$this
->
panels
))
{
...
@@ -99,6 +99,8 @@ class Module extends \yii\base\Module implements BootstrapInterface
...
@@ -99,6 +99,8 @@ class Module extends \yii\base\Module implements BootstrapInterface
*/
*/
public
function
bootstrap
(
$app
)
public
function
bootstrap
(
$app
)
{
{
$this
->
logTarget
=
Yii
::
$app
->
getLog
()
->
targets
[
'debug'
]
=
new
LogTarget
(
$this
);
// delay attaching event handler to the view component after it is fully configured
// delay attaching event handler to the view component after it is fully configured
$app
->
on
(
Application
::
EVENT_BEFORE_REQUEST
,
function
()
use
(
$app
)
{
$app
->
on
(
Application
::
EVENT_BEFORE_REQUEST
,
function
()
use
(
$app
)
{
$app
->
getView
()
->
on
(
View
::
EVENT_END_BODY
,
[
$this
,
'renderToolbar'
]);
$app
->
getView
()
->
on
(
View
::
EVENT_END_BODY
,
[
$this
,
'renderToolbar'
]);
...
...
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