title: how to read error.log file in cakephp 3.x
body: <p>I am trying to read error.log file.</p>
  
  <pre><code>function readerrorlog(){
        $file = new File('/tmp/error/error.log');
        $errorfile = $file-&gt;read(true, 'r');
  }
  
  $file returns array File Object
  (
      [Folder] =&gt; Folder Object
          (
              [path] =&gt; 
              [sort] =&gt; 
              [mode] =&gt; 493
              [_messages:protected] =&gt; Array
                  (
                  )
  
              [_errors:protected] =&gt; Array
                  (
                  )
  
              [_directories:protected] =&gt; 
              [_files:protected] =&gt; 
          )
  
      [name] =&gt; error.log
      [info] =&gt; Array
          (
          )
  
      [handle] =&gt; 
      [lock] =&gt; 
      [path] =&gt; /error.log
  )
  </code></pre>
  
  <p>and <code>$errorfile</code> is returning nothing </p>