Returns `True` if the watcher `what` would log under `level_name`.
779279
def worth(what, level_name):
    """"""
    return (logging.NOTSET
            < globals()[what].level
            <= getattr(logging, level_name))
1204437
def posted(self):
        
        for who, record in self.logs:
            if record["field_name"] == "status" and record["added"] == "POST":
                return True
        return False
428074
private void isparentlogger(Logger logchannel) {

        // get all log channels
        List<Logger> referenz = getLoggers();
        Iterator<Logger> it_logger = referenz.iterator();
        while (it_logger.hasNext()) {
            Logger child_test = it_logger.next();
            // if the logchannel has the given logchannel as parent his loglevel is set to the parent one.
            if (logchannel.getName().equals(child_test.getParent().getName())) {
                isparentlogger(child_test);
                child_test.setLevel(null);
            }
        }
    }
95047
def _check_log_level(self, level):
        '''
        
        '''
        if level not in list(self.level_dict.keys()):
            self.log_level = 'DEBUG'
            self.logger.warn("Unknown log level '{lev}', defaulting to DEBUG"
                             .format(lev=level))
345318
def _get_py_loglevel(lvl):
    
    if not lvl:
        lvl = 'INFO'

    return LOG_LEVEL_MAP.get(lvl.upper(), logging.DEBUG)
470002
protected void notifyObservers (int level)
    {
        final int warningsLeft = getWarnings().length - level - 1;
        final long msLeft = _nextReboot - System.currentTimeMillis();
        _observers.apply(new ObserverList.ObserverOp<PendingShutdownObserver>() {
            public boolean apply (PendingShutdownObserver observer) {
                observer.shutdownPlanned(warningsLeft, msLeft);
                return true;
            }
        });
    }
2166
public boolean isLoggable(Logger logger, Level l) {
        return logger.isLoggable(l) && l.intValue() >= this.logLevel;
    }
884458
def _has_level_handler(logger):
    
    level = logger.getEffectiveLevel()
    current = logger

    while current:
        if any(handler.level <= level for handler in current.handlers):
            return True

        if not current.propagate:
            break

        current = current.parent

    return False
884209
private boolean hasBacklog()
    {
        final long cursor = ringBuffer.getCursor();
        for (final Sequence consumer : consumerRepository.getLastSequenceInChain(false))
        {
            if (cursor > consumer.get())
            {
                return true;
            }
        }
        return false;
    }
551621
def set_logging_level(level_name=None):
    
    can_logger = logging.getLogger('can')

    try:
        can_logger.setLevel(getattr(logging, level_name.upper()))
    except AttributeError:
        can_logger.setLevel(logging.DEBUG)
    log.debug("Logging set to {}".format(level_name))
964754
async def _watch(self):
        

        file_name = os.path.basename(self._file_path)
        logger.info(
            'Watching %s "%s"',
            self.THING,
            self._file_path,
        )

        while self._running:
            evt = await self._watcher.get_event()

            if evt.name == file_name:
                await self._load()
                logger.info(
                    'Reloading changed %s from "%s"',
                    self.THING,
                    self._file_path
                )
954437
def set_log_level(logger_name: str, log_level: str, propagate: bool = False):
    """"""
    log = logging.getLogger(logger_name)
    log.propagate = propagate
    log.setLevel(log_level)
850656
def watcher(self) -> Watcher:
        
        if not hasattr(self, "_watcher"):
            self._watcher = Watcher()
        return self._watcher
872409
public static function isWatching($item_id, $item_type, $created_by)
	{
		if ($item_id && $item_type && $created_by)
		{
			$total = self::all()
				->whereEquals('state', 1)
				->whereEquals('created_by', (int)$created_by)
				->whereEquals('item_id', (int)$item_id)
				->whereEquals('item_type', (string)$item_type)
				->total();

			if ($total)
			{
				return true;
			}
		}

		return false;
	}
563246
def _watchdog(self):
        '''  '''
        too_early = (time.time() - self._last_time < self._min_interval)
        too_much = (self._count >= self._rate_limit)
        return (False if (too_early or too_much) else True)
1093859
public boolean containsLogEntry(long entryIndex) {
        long sequence = toSequence(entryIndex);
        return sequence >= logs.headSequence() && sequence <= logs.tailSequence();
    }
36344
boolean shouldLog(int level) {
        switch (level) {
            case 8:
                return false;
            case 7: // SEVERE
                return _tc.isErrorEnabled();
            case 6: // WARN
                return _tc.isWarningEnabled();
            case 5: // INFO
                return _tc.isInfoEnabled();
            case 4: // CONFIG
                return _tc.isConfigEnabled();
            case 3: // FINE
                return _tc.isEventEnabled();
            case 2: // FINER
                return _tc.isEntryEnabled();
            case 1: // FINEST
            case 0: // TRACE
            default:
                return _tc.isDebugEnabled();
        }// end switch
    }