Changes
Title
unchanged
How to log context information to logger (session id, user, ...)
Category
unchanged
Tutorials
Yii version
unchanged
Tags
changed
Logging
Content
changed
Logging context information (session, user, ...) to the logfile can be of great help tracking down problems with specific users.
*This
will be available inrequires Yii 1.0.6
.*
**config/main.php**[...]
```php
<?php
return array(
// ...
'preload'=>array('log', 'session'),
// ...
'components'=>array(
// ...[...]
```
You could also extend [CLogFilter
] to do your own log message decoration.
### Links
[Russian Version](http://dbhelp.ru/how-to-log-context-information-to-logger/page/)