Created
May 24, 2012 09:52
-
-
Save mgcrea/2780524 to your computer and use it in GitHub Desktop.
li3 logQueries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function __init() { | |
parent::__init(); | |
static::applyFilter('find', function($self, $params, $chain){ | |
Logger::info(json_encode(array('Model::find()' => $params))); | |
return $chain->next($self, $params, $chain); | |
}); | |
static::applyFilter('save', function($self, $params, $chain){ | |
Logger::info(json_encode(array('Model::save()' => $params))); | |
return $chain->next($self, $params, $chain); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment