Skip to content

fathineos/yiiLogExtension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PeoplePerHour/YiiLogExtension

Build Status

YiiLogExtension is a component that extends Yii::log functionality to handle arrays and exceptions and output in files in JSON format. Finally handles log rotation.

Usage Example

Register JsonLogger in your log route configuration

array(
    'class'       =>'JsonLogger',
    'categories'  =>'category_key',
    'logFile'     =>'output.json', // File to be parsed by logstash
    'logPath'     =>dirname(__FILE__).'/../../logs',
    'maxFileSize' =>5120,
    'maxLogFiles' =>50,
)

Use LogWrapper, which extends Yii::log functionality

LogWrapper::log('dummy message', 'error_level', 'category_key')
LogWrapper::logArray($array, 'error_level', 'category_key')
LogWrapper::logException($exc, 'error_level', 'category_key')

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages