Skip to content

Instantly share code, notes, and snippets.

@mgcrea
Created May 24, 2012 09:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgcrea/2780524 to your computer and use it in GitHub Desktop.
Save mgcrea/2780524 to your computer and use it in GitHub Desktop.
li3 logQueries
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