Log a failed action for an item. If the fail count for this item reaches the threshold, the item is moved to the
        blacklist.

        :param str item: The item to log
519384
def log_fail(self, item: str) -> None:
        
        assert item is not None
        item = self._encode_item(item)
        if self.is_blocked(item):
            return
        connection = self.__get_connection()
        key = self.__redis_conf['watchlist_template'].format(item)
        value = connection.get(key)
        if value is None:
            connection.set(key, 1, ex=self.__redis_conf['watchlist_ttl'])
            BlackRed.__release_connection(connection)
            return
        value = int(value) + 1
        if value < self.__redis_conf['watchlist_to_blacklist']:
            connection.set(key, value, ex=self.__redis_conf['watchlist_ttl'])
            BlackRed.__release_connection(connection)
            return
        blacklist_key = self.__redis_conf['blacklist_template'].format(item)
        connection.set(blacklist_key, time.time(), ex=self.__redis_conf['blacklist_ttl'])
        connection.delete(key)
        BlackRed.__release_connection(connection)
372143
def failed(self, message):
        '''
        
        '''
        return self._log(
            message=message.upper(),
            stream=sys.stderr,
            color=Logger.COLOR_RED_BOLD,
            newline=True
        )
940514
public function log( common_log_Item $item)
    {
        foreach ($this->appenders as $appender) {
        	$appender->log($item);
        }
    }
311700
def _set_raise_on_bulk_item_failure(self, raise_on_bulk_item_failure):
        
        self._raise_on_bulk_item_failure = raise_on_bulk_item_failure
        self.bulker.raise_on_bulk_item_failure = raise_on_bulk_item_failure
290585
def fail(self) -> None:
        

        _debug("fail")

        # on commit carry out action; on rollback reverse rename
        def on_commit(_obj):
            raise_testfailure("commit")

        def on_rollback(_obj):
            raise_testfailure("rollback")

        return self._process(on_commit, on_rollback)
847977
function _printItem (item) {
  switch(item.type) {
    case 'option':
      console.log(item.index + ': ' + item.label);
      break;
    case 'break':
      for (var breakString = ''; breakString.length < item.charCount;) {
        breakString += item.character;
      }

      console.log(breakString);
      break;
    case 'text':
      console.log(item.text);
      break;
    default:
      console.error('Invalid item type: ' + item.type);
      process.exit();
  }
}
529826
protected final void itemHasBeenRestored(AbstractItem item)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "itemHasBeenRestored", item);

        super.itemHasBeenRestored(item);
        _setWatermarks((ItemStream)item);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "itemHasBeenRestored");
    }
351453
protected function setLogging(Item $item)
    {
        $solrConfiguration = Util::getSolrConfigurationFromPageId($item->getRootPageUid());
        $this->loggingEnabled = $solrConfiguration->getLoggingIndexingQueueOperationsByConfigurationNameWithFallBack(
            $item->getIndexingConfigurationName()
        );
    }
1267523
def _step_failure(self, exc):
        
        self.log_crit(u"STEP %d (%s) FAILURE" % (self.step_index, self.step_label))
        self.step_index += 1
        self.log_exc(u"Unexpected error while executing task", exc, True, ExecuteTaskExecutionError)
794643
def failure_format_traceback(self, fail):
        
        try:
            f = six.StringIO()
            traceback.print_exception(
                fail._type,
                fail.value,
                fail._traceback,
                file=f,
            )
            return f.getvalue()
        except Exception:
            return u"Failed to format failure traceback for '{0}'".format(fail)
552558
def on_failure(self, entity):
        
        logger.error("Login failed, reason: %s" % entity.getReason())
        self.connected = False
1290920
def run(self, error_on_warning=False, verbose=False):
        
        warnings, criticals = self.check_limits(verbose=verbose)
        # output
        if len(warnings) > 0:
            print("\nWARNING:\n")
            for w in warnings:
                print(w)
        if len(criticals) > 0:
            print("\nCRITICAL:\n")
            for c in criticals:
                print(c)

        # summary
        if len(warnings) > 0 or len(criticals) > 0:
            print("\n{c} limit(s) above CRITICAL threshold; {w} limit(s) above "
                  "WARNING threshold".format(c=len(criticals), w=len(warnings)))
        else:
            print("All limits are within thresholds.")
        if (len(warnings) > 0 and error_on_warning) or len(criticals) > 0:
            raise SystemExit(1)
1316889
protected void doChecks(CacheItem item, List<CacheItem> itemsToRefresh) {
        boolean expired;
        boolean willBeRefreshed;

        try {
            expired = checkForExpiration(item);
            if (expired) {
                if (logger.isDebugEnabled()) {
                    logger.debug(item + " was removed because it expired");
                }
            } else {
                willBeRefreshed = checkForRefresh(item, itemsToRefresh);
                if (willBeRefreshed) {
                    if (logger.isDebugEnabled()) {
                        logger.debug(item + " will be refreshed");
                    }
                }
            }
        } catch (Exception ex) {
            logger.warn("Exception while checking " + item + " for expiration/refresh", ex);
        }
    }
184643
def trigger_failure(data=nil)
      event.success = false
      event.data = data
      event.trigger
    end
1200681
function(item, callback) {
                if (item.uniqueId != '') {
                    if (hasCache && typeof queueDb == 'object') {
                        queueDb.waitQ
                            .put({
                                threadId: parseInt(item.subjectId),
                                uniqueId: item.uniqueId,
                                owner: parseInt(userInfo.id),
                                message: Utility.crypt(item, cacheSecret)
                            })
                            .then(function() {
                                callback && callback();
                            })
                            .catch(function(error) {
                                fireEvent('error', {
                                    code: error.code,
                                    message: error.message,
                                    error: error
                                });
                            });
                    }
                    else {
                        chatWaitQueue.push(item);
                        callback && callback();
                    }
                }
            }
575852
def _kafka_failure(self, item, spider, response):
        '''
        
        '''
        item['success'] = False
        item['exception'] = traceback.format_exc()
        item['spiderid'] = spider.name
        item = self._clean_item(item)
        self.logger.error("Failed to send page to Kafka", item)
835935
public function doLog(common_log_Item $item)
    {
        if (is_null($this->filehandle)) {
            $this->initFile();
        }
        if ($this->filehandle !== false) {
            $map = array(
                '%d' => gmdate('Y-m-d H:i:s', $item->getDateTime()),
                '%m' => $item->getDescription(),
                '%p' => $this->prefix,
                '%s' => $item->getSeverityDescriptionString(),
                '%t' => $item->getDateTime(),
                '%r' => $item->getRequest(),
                '%f' => $item->getCallerFile(),
                '%g' => implode(',', $item->getTags()),
                '%l' => $item->getCallerLine()
            );
            if (strpos($this->format, '%b')) {
                $map['%b'] = 'Backtrace not yet supported';
            }
            $str = strtr($this->format, $map) . PHP_EOL;
            @fwrite($this->filehandle, $str);
        }
    }