You are here

protected function FeedsExBase::logErrors in Feeds extensible parsers 7

Same name and namespace in other branches
  1. 7.2 src/FeedsExBase.inc \FeedsExBase::logErrors()

Logs errors.

Parameters

FeedsSource $source: The feed source being importerd.

array $errors: A list of errors as returned by stopErrorHandling().

int $severity: (optional) Limit to only errors of the specified severity. Defaults to WATCHDOG_ERROR.

See also

watchdog()

1 call to FeedsExBase::logErrors()
FeedsExBase::parse in src/FeedsExBase.inc

File

src/FeedsExBase.inc, line 346
Contains FeedsExBase.

Class

FeedsExBase
The Feeds extensible parser.

Code

protected function logErrors(FeedsSource $source, array $errors, $severity = WATCHDOG_ERROR) {
  foreach ($errors as $error) {
    if ($error['severity'] > $severity) {
      continue;
    }
    $source
      ->log('feeds_ex', $error['message'], $error['variables'], $error['severity']);
  }
}