CLogRouter

Namelog
ClassCLogRouter
Location/home/vhosts/app-manager.eu5.org/framework/logging/CLogRouter.php
CLogRouter manages log routes that record log messages in different media.

For example, a file log route {@link CFileLogRoute} records log messages in log files. An email log route {@link CEmailLogRoute} sends log messages to specific email addresses. See {@link CLogRoute} for more details about different log routes. Log routes may be configured in application configuration like following:
array(
    'preload'=>array('log'), // preload log component when app starts
    'components'=>array(
        'log'=>array(
            'class'=>'CLogRouter',
            'routes'=>array(
                array(
                    'class'=>'CFileLogRoute',
                    'levels'=>'trace, info',
                    'categories'=>'system.*',
                ),
                array(
                    'class'=>'CEmailLogRoute',
                    'levels'=>'error, warning',
                    'emails'=>array('admin@example.com'),
                ),
            ),
        ),
    ),
)
You can specify multiple routes with different filtering conditions and different targets, even if the routes are of the same type.

Options

Displaying 1-2 of 2 results.
NameValueDescriptionType
behaviorsarray()The behaviors that should be attached to this component. The behaviors will be attached to the component when {@link init} is called. Please refer to {@link CModel::behaviors} on how to specify the value of this property.array
routesarray ( array ( 'class' => 'CFileLogRoute', 'levels' => 'error, warning', ), )List of route configurations. Each array element represents the configuration for a single route and has the following array structure: <ul> <li>class: specifies the class name or alias for the route class.</li> <li>name-value pairs: configure the initial property values of the route.</li> </ul>array