Exemple #1
0
 public function read()
 {
     $destination = $this->config('file');
     $type = $destination ? $this->config('storage') : self::SYSTEM;
     if ($type == self::FILE && $destination && class_exists('FileSystem')) {
         $file_config = array('mode' => 'a');
         $messenger = new FileSystem($file_config);
         $messenger->file($destination);
         $messenger->read();
         $status = $messenger->status();
         $data = $messenger->data();
         return $data;
     }
     $this->status("Cannot open log files with current settings.");
     return false;
 }