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
2dd51d5b
Commit
2dd51d5b
authored
May 08, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes issue #177.
parent
01ae0150
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
10 deletions
+20
-10
main.php
apps/bootstrap/protected/config/main.php
+10
-0
Application.php
framework/base/Application.php
+0
-1
Logger.php
framework/logging/Logger.php
+4
-2
Router.php
framework/logging/Router.php
+6
-7
No files found.
apps/bootstrap/protected/config/main.php
View file @
2dd51d5b
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
return
array
(
return
array
(
'id'
=>
'hello'
,
'id'
=>
'hello'
,
'basePath'
=>
dirname
(
__DIR__
),
'basePath'
=>
dirname
(
__DIR__
),
'preload'
=>
array
(
'log'
),
'components'
=>
array
(
'components'
=>
array
(
'cache'
=>
array
(
'cache'
=>
array
(
'class'
=>
'yii\caching\FileCache'
,
'class'
=>
'yii\caching\FileCache'
,
...
@@ -14,6 +15,15 @@ return array(
...
@@ -14,6 +15,15 @@ return array(
'assetManager'
=>
array
(
'assetManager'
=>
array
(
'bundles'
=>
require
(
__DIR__
.
'/assets.php'
),
'bundles'
=>
require
(
__DIR__
.
'/assets.php'
),
),
),
'log'
=>
array
(
'class'
=>
'yii\logging\Router'
,
'targets'
=>
array
(
'file'
=>
array
(
'class'
=>
'yii\logging\FileTarget'
,
'levels'
=>
array
(
'error'
,
'warning'
),
),
),
),
),
),
'params'
=>
array
(
'params'
=>
array
(
'adminEmail'
=>
'admin@example.com'
,
'adminEmail'
=>
'admin@example.com'
,
...
...
framework/base/Application.php
View file @
2dd51d5b
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
namespace
yii\base
;
namespace
yii\base
;
use
Yii
;
use
Yii
;
use
yii\helpers\FileHelper
;
/**
/**
* Application is the base class for all application classes.
* Application is the base class for all application classes.
...
...
framework/logging/Logger.php
View file @
2dd51d5b
...
@@ -6,7 +6,9 @@
...
@@ -6,7 +6,9 @@
*/
*/
namespace
yii\logging
;
namespace
yii\logging
;
use
yii\base\InvalidConfigException
;
use
\yii\base\Component
;
use
\yii\base\InvalidConfigException
;
/**
/**
* Logger records logged messages in memory.
* Logger records logged messages in memory.
...
@@ -17,7 +19,7 @@ use yii\base\InvalidConfigException;
...
@@ -17,7 +19,7 @@ use yii\base\InvalidConfigException;
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
* @since 2.0
*/
*/
class
Logger
extends
\yii\base\
Component
class
Logger
extends
Component
{
{
/**
/**
* Error message level. An error message is one that indicates the abnormal termination of the
* Error message level. An error message is one that indicates the abnormal termination of the
...
...
framework/logging/Router.php
View file @
2dd51d5b
...
@@ -28,16 +28,16 @@ use yii\base\Application;
...
@@ -28,16 +28,16 @@ use yii\base\Application;
* 'preload' => array('log'),
* 'preload' => array('log'),
* 'components' => array(
* 'components' => array(
* 'log' => array(
* 'log' => array(
* 'class' => '
\
yii\logging\Router',
* 'class' => 'yii\logging\Router',
* 'targets' => array(
* 'targets' => array(
* 'file' => array(
* 'file' => array(
* 'class' => '
\
yii\logging\FileTarget',
* 'class' => 'yii\logging\FileTarget',
* 'levels' =>
'trace, info'
,
* 'levels' =>
array('trace', 'info')
,
* 'categories' =>
'yii\*'
,
* 'categories' =>
array('yii\*')
,
* ),
* ),
* 'email' => array(
* 'email' => array(
* 'class' => '
\
yii\logging\EmailTarget',
* 'class' => 'yii\logging\EmailTarget',
* 'levels' =>
'error, warning'
,
* 'levels' =>
array('error', 'warning')
,
* 'emails' => array('admin@example.com'),
* 'emails' => array('admin@example.com'),
* ),
* ),
* ),
* ),
...
@@ -73,7 +73,6 @@ class Router extends Component
...
@@ -73,7 +73,6 @@ class Router extends Component
public
function
init
()
public
function
init
()
{
{
parent
::
init
();
parent
::
init
();
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