code: public function toArray()
      {
          return [
              'level'    => $this->level,
              'datetime' => $this->datetime->format('Y-m-d H:i:s'),
              'header'   => $this->header,
              'stack'    => $this->stack,
          ];
      }
docs: Get the log entry as an array.
  
  @return array