title: How to get SQL Query on model->save() in CakePHP 3?
body: <p>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.</p>
  
  <p>I need it because I want to save that to a log file in some cases.</p>
  
  <p>My bootstrap.php log config:</p>
  
  <pre><code>Log::config('current', [
      'className' =&gt; 'File',
      'path' =&gt; LOGS.DS.date('Y-m').DS,
      'scopes' =&gt; ['daily','queriesLog'],
      'file' =&gt; date('Y-m-d'),
  ]);
  </code></pre>
  
  <p>What i want to get:</p>
  
  <p>e.g when i save entity:</p>
  
  <pre><code>$this-&gt;Clients-&gt;save($client);
  </code></pre>
  
  <p>i want to log something and i want to save INSERT sql query with this log</p>
  
  <pre><code>Log::warning('test\n', ['scope' =&gt; ['daily']]);
  </code></pre>