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
3d10cb18
Commit
3d10cb18
authored
Jul 24, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed default value of Logger::traceLevel.
parent
e433c98e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
main.php
apps/advanced/frontend/config/main.php
+0
-1
Logger.php
framework/yii/log/Logger.php
+8
-3
No files found.
apps/advanced/frontend/config/main.php
View file @
3d10cb18
...
@@ -23,7 +23,6 @@ return array(
...
@@ -23,7 +23,6 @@ return array(
'identityClass'
=>
'common\models\User'
,
'identityClass'
=>
'common\models\User'
,
),
),
'log'
=>
array
(
'log'
=>
array
(
'traceLevel'
=>
YII_DEBUG
?
3
:
0
,
'targets'
=>
array
(
'targets'
=>
array
(
array
(
array
(
'class'
=>
'yii\log\FileTarget'
,
'class'
=>
'yii\log\FileTarget'
,
...
...
framework/yii/log/Logger.php
View file @
3d10cb18
...
@@ -136,10 +136,12 @@ class Logger extends Component
...
@@ -136,10 +136,12 @@ class Logger extends Component
public
$flushInterval
=
1000
;
public
$flushInterval
=
1000
;
/**
/**
* @var integer how much call stack information (file name and line number) should be logged for each message.
* @var integer how much call stack information (file name and line number) should be logged for each message.
* Defaults to 0, meaning no backtrace information. If it is greater than 0,
* If it is greater than 0, at most that number of call stacks will be logged. Note that only application
* at most that number of call stacks will be logged. Only application call stacks are considered.
* call stacks are counted.
*
* If not set, it will default to 3 when `YII_ENV` is set as "dev", and 0 otherwise.
*/
*/
public
$traceLevel
=
0
;
public
$traceLevel
;
/**
/**
* Initializes the logger by registering [[flush()]] as a shutdown function.
* Initializes the logger by registering [[flush()]] as a shutdown function.
...
@@ -147,6 +149,9 @@ class Logger extends Component
...
@@ -147,6 +149,9 @@ class Logger extends Component
public
function
init
()
public
function
init
()
{
{
parent
::
init
();
parent
::
init
();
if
(
$this
->
traceLevel
===
null
)
{
$this
->
traceLevel
=
YII_ENV
===
'dev'
?
3
:
0
;
}
foreach
(
$this
->
targets
as
$name
=>
$target
)
{
foreach
(
$this
->
targets
as
$name
=>
$target
)
{
if
(
!
$target
instanceof
Target
)
{
if
(
!
$target
instanceof
Target
)
{
$this
->
targets
[
$name
]
=
Yii
::
createObject
(
$target
);
$this
->
targets
[
$name
]
=
Yii
::
createObject
(
$target
);
...
...
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