code: protected function write(array $record)
      {
          $severity = $this->getSeverity($record['level']);
          if (isset($record['context']['exception'])) {
              $this->client->notifyException(
                  $record['context']['exception'],
                  function (\Bugsnag\Report $report) use ($record, $severity) {
                      $report->setSeverity($severity);
                      if (isset($record['extra'])) {
                          $report->setMetaData($record['extra']);
                      }
                  }
              );
          } else {
              $this->client->notifyError(
                  (string) $record['message'],
                  (string) $record['formatted'],
                  function (\Bugsnag\Report $report) use ($record, $severity) {
                      $report->setSeverity($severity);
                      if (isset($record['extra'])) {
                          $report->setMetaData($record['extra']);
                      }
                  }
              );
          }
      }
docs: Writes the record down to the log of the implementing handler
  
  @param  array $record
  @return void