How to get SQL Query on model->save() in CakePHP 3?
问题 How can I view the SQL Query on model->save() in CakePHP 3? Is there any way to do this? I want to get the specific sql query e.g when I save new entity. I need it because I want to save that to a log file in some cases. My bootstrap.php log config: Log::config('current', [ 'className' => 'File', 'path' => LOGS.DS.date('Y-m').DS, 'scopes' => ['daily','queriesLog'], 'file' => date('Y-m-d'), ]); What i want to get: e.g when i save entity: $this->Clients->save($client); i want to log something