title: AppModel aftersave, get controller function name
body: <p>I'm trying to log every write operation so I'm using the afterSave and afterDelete callbacks in AppModel. Basically I need to log(for the moment): the model , the controller function, the loggedin user data and the remote ip
  It seems that I was able to get all of them but I don't know how to get the controller function name.
  This is the aftersave function I have now:</p>
  
  <pre><code>public function afterSave($created) {
      App::uses('Folder', 'Utility');
      $month = date("y-m");
      if(!is_dir('../tmp/logs/'.$month)) {
          $dir = new Folder('../tmp/logs/'.$month, true);
      }
      App::uses('CakeSession', 'Model/Datasource');
      $user_id = CakeSession::read('Auth.User.username');
      if($created) {
          $id =   'New';
      } else {
          $id =   $this-&gt;data[$this-&gt;alias]['id'];
      }
      $str = 'WRITE Action. Model: '.$this-&gt;alias.'. Controller: functon_name. ID:'.$id.'. Username: '.$user_id.'. Client IP: '.$this-&gt;getIP();
      CakeLog::write($month.'/'.date("d-m-y"), $str);
  }
  </code></pre>
  
  <p>Thanks</p>