code: protected function parse()
      {
          $log = [];
  
          $pattern = "/\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\].*/";
  
          preg_match_all($pattern, $this->raw, $headings);
          $data = preg_split($pattern, $this->raw);
  
          if ($data[0] < 1) {
              $trash = array_shift($data);
              unset($trash);
          }
  
          foreach ($headings as $heading) {
              for ($i = 0, $j = count($heading); $i < $j; $i++) {
                  foreach ($this->levels as $level) {
                      if ($this->level == $level || $this->level == 'all') {
                          if (strpos(strtolower($heading[$i]), strtolower('.'.$level))) {
                              $log[] = ['level' => $level, 'header' => $heading[$i], 'stack' => $data[$i]];
                          }
                      }
                  }
              }
          }
  
          unset($headings);
          unset($data);
  
          return array_reverse($log);
      }
docs: Parse the log.
  
  @return array