You are here

public function PuSHEnvironment::log in Feeds 6

Same name and namespace in other branches
  1. 7.2 plugins/FeedsHTTPFetcher.inc \PuSHEnvironment::log()
  2. 7 plugins/FeedsHTTPFetcher.inc \PuSHEnvironment::log()

Implements PuSHSubscriberEnvironmentInterface::log().

Overrides PuSHSubscriberEnvironmentInterface::log

File

plugins/FeedsHTTPFetcher.inc, line 295

Class

PuSHEnvironment
Provide environmental functions to the PuSHSubscriber library.

Code

public function log($msg, $level = 'status') {
  switch ($level) {
    case 'error':
      $severity = WATCHDOG_ERROR;
      break;
    case 'warning':
      $severity = WATCHDOG_WARNING;
      break;
    default:
      $severity = WATCHDOG_NOTICE;
      break;
  }
  feeds_dbg($msg);
  watchdog('FeedsHTTPFetcher', $msg, array(), $severity);
}