Logs a deprecation notice at most once per AgentCheck instance, for the pre-defined `deprecation_key`
338309
def _log_deprecation(self, deprecation_key):
        
        if not self._deprecations[deprecation_key][0]:
            self.log.warning(self._deprecations[deprecation_key][1])
            self._deprecations[deprecation_key][0] = True
323229
def log_before_after(name: str, desc: str):
    """"""

    def func_decorator(f):
        """Wrapper stub."""

        @ft.wraps(f)
        def wrapper(*args, **kwargs):
            """Wrapper stub."""
            LOG.info("\n%s - %s", name, desc)
            res = f(*args, **kwargs)
            if StepResult.ERROR not in res:
                LOG.info("%s - OK\n", name)
            else:
                LOG.error("%s - ERROR\n", name)
            return res

        return wrapper

    return func_decorator
1039288
def lastLogged(self):
        """"""
        d = copy.deepcopy(self.__lastLogged)
        d.pop(-1, None)
        return d
1045135
def _check_deprecated(self, dest, kwargs):
    """"""
    removal_version = kwargs.get('removal_version', None)
    if removal_version is not None:
      warn_or_error(
        removal_version=removal_version,
        deprecated_entity_description="option '{}' in {}".format(dest, self._scope_str()),
        deprecation_start_version=kwargs.get('deprecation_start_version', None),
        hint=kwargs.get('removal_hint', None),
        stacklevel=9999)
928947
function deprecate(method, name, message) {
    var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\n' + message + ' AT \n';
    return function() {
        var e = new Error('get-stack-trace');
        var stack = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, '')
            .replace(/^\s+at\s+/gm, '')
            .replace(/^Object.<anonymous>\s*\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';

        var log = window.console && (window.console.warn || window.console.log);
        if (log) {
            log.call(window.console, deprecationMessage, stack);
        }
        return method.apply(this, arguments);
    };
}
310348
def before_log(logger, log_level):
    """"""
    def log_it(retry_state):
        logger.log(log_level,
                   "Starting call to '%s', this is the %s time calling it.",
                   _utils.get_callback_name(retry_state.fn),
                   _utils.to_ordinal(retry_state.attempt_number))

    return log_it
137931
void handleAgentLogoffEvent(AgentLogoffEvent event)
    {
        AsteriskAgentImpl agent = getAgentByAgentId("Agent/" + event.getAgent());
        if (agent == null)
        {
            logger.error("Ignored AgentLogoffEvent for unknown agent "
                    + event.getAgent() + ". Agents: "
                    + agents.values().toString());
            return;
        }
        agent.updateState(AgentState.AGENT_LOGGEDOFF);
    }
84115
def deprecation_notice(version, config = {})
      handler = Notifaction::Type::Terminal.new
      handler.warning(
        "Deprecated as of #{version}, current #{Notifaction::VERSION}",
        config
      )
      handler.quit_soft
    end
1061240
private static function deprecationWarning() {
        $caller = next(debug_backtrace());
        $msg = 'Deprecated Db-function in function ' . $caller['function'] . ' called from ' . $caller['file'];
        $msg .= ' on line ' . $caller['line'];
        trigger_error($msg, E_USER_NOTICE);
    }
479853
public void l7dlog(Priority priority, String key, Throwable t) {
        if (repository.isDisabled(priority.level)) {
            return;
        }
        if (priority.isGreaterOrEqual(this.getEffectiveLevel())) {
            String msg = getResourceBundleString(key);
            // if message corresponding to 'key' could not be found in the
            // resource bundle, then default to 'key'.
            if (msg == null) {
                msg = key;
            }
            forcedLog(FQCN, priority, msg, t);
        }
    }
807627
def deprecated(message=DEPRECATION_MESSAGE, logger=None):
    
    if logger is None:
        logger = default_logger
    def _deprecated(f):
        def _wrapper(*args, **kwargs):
            f_name = f.__name__
            logger.warning(message.format(name=f_name))
            result = f(*args, **kwargs)
            return result
        return _wrapper
    return _deprecated
609095
def warn(self, msg, *args, **kwargs):
    """"""
    if six.PY3:
      warnings.warn("The 'warn' method is deprecated, use 'warning' instead",
                    DeprecationWarning, 2)
    self.log(logging.WARN, msg, *args, **kwargs)
1260077
protected function deprecatedScaffoldKeyNotice($deprecatedKey, $newKey)
    {
        $template = 'The configuration key %s has been deprecated. Use %s instead.';
        $message = sprintf($template, $deprecatedKey, $newKey);
        trigger_error($message, E_USER_DEPRECATED);
    }
320370
function deprecateMethod(book, key, fn, msg) {
    return function() {
        logNotice(book, key, msg);

        return fn.apply(this, arguments);
    };
}
582926
def log(self, request, spider):
        
        if self.debug:
            msg = "Filtered duplicate request: %(request)s"
            self.logger.debug(msg, {'request': request}, extra={'spider': spider})
        elif self.logdupes:
            msg = ("Filtered duplicate request %(request)s"
                   " - no more duplicates will be shown"
                   " (see DUPEFILTER_DEBUG to show all duplicates)")
            self.logger.debug(msg, {'request': request}, extra={'spider': spider})
            self.logdupes = False
602147
def deprecated(message=None):
    """"""
    def deco(func):
        @functools.wraps(func)
        def wrapped(*args, **kwargs):
            warnings.warn(
                message or 'Call to deprecated function {}'.format(func.__name__),
                category=PubChemPyDeprecationWarning,
                stacklevel=2
            )
            return func(*args, **kwargs)
        return wrapped
    return deco
911908
function deprecationInfo(feed,name,type,deprecated_since) {
// apparently there is also a 'guaranteed_until' attribute - not seen
	var result = '';
	var d = feed.deprecations.deprecated;
	if (d) {
		for (var i=0;i<d.length;i++) {
			if ((d[i].name == name) && (d[i].type == type)) {
				if ((!deprecated_since) && (d[i].deprecated_since)) {
					deprecated_since = d[i].deprecated_since;
				}
				if (d[i].replaced_by) {
					result = result + '-> ' + d[i].replaced_by;
				}
			}
		}
	}
	result = ' since ' + (deprecated_since ? deprecated_since : 'unknown')+' '+result;
	return result;
}