// ShouldLog returns true if the specified log level should be logged.
517521
func (po *PolicyOptions) ShouldLog(level LogLevel) bool {
	if po.pipeline.options.Log.ShouldLog != nil {
		return po.pipeline.options.Log.ShouldLog(level)
	}
	return false
}
1074371
func (c *Connection) shouldLogError(
	op interface{},
	err error) bool {
	// We don't log non-errors.
	if err == nil {
		return false
	}

	// We can't log if there's nothing to log to.
	if c.errorLogger == nil {
		return false
	}

	switch op.(type) {
	case *fuseops.LookUpInodeOp:
		// It is totally normal for the kernel to ask to look up an inode by name
		// and find the name doesn't exist. For example, this happens when linking
		// a new file.
		if err == syscall.ENOENT {
			return false
		}

	case *fuseops.GetXattrOp:
		if err == syscall.ENODATA || err == syscall.ERANGE {
			return false
		}
	case *unknownOp:
		// Don't bother the user with methods we intentionally don't support.
		if err == syscall.ENOSYS {
			return false
		}
	}

	return true
}
165306
func (self *Logic) SetLog(w io.Writer) App {
	logs.Log.SetOutput(w)
	return self
}
375475
func (s *Scratch) optimalTableLog() {
	tableLog := s.TableLog
	minBits := s.minTableLog()
	maxBitsSrc := uint8(highBits(uint32(s.br.remain()-1))) - 2
	if maxBitsSrc < tableLog {
		// Accuracy can be reduced
		tableLog = maxBitsSrc
	}
	if minBits > tableLog {
		tableLog = minBits
	}
	// Need a minimum to safely represent all symbol values
	if tableLog < minTablelog {
		tableLog = minTablelog
	}
	if tableLog > maxTableLog {
		tableLog = maxTableLog
	}
	s.actualTableLog = tableLog
}
518629
func (h *Handler) HandleLog(e *log.Entry) error {
	if e.Level < h.Level {
		return nil
	}

	return h.Handler.HandleLog(e)
}
1358785
func (c *config) log(event Event, err error, args ...interface{}) {
	if c.lfunc != nil {
		c.lfunc(event, err, args...)
	}
}
1049179
func (d DefaultLogger) Log(level LogLevel, a ...interface{}) (n int, err error) {
	if level >= logThreshhold {
		fmt.Fprint(os.Stderr, prefix(level)+" ")
		return fmt.Fprintln(os.Stderr, a...)
	}
	return 0, nil
}
531563
func (l *Logger) Log(format string, args ...interface{}) {
	l.log(1, false, format, args...)
}
141717
func (s *TestInvokeAuthorizerOutput) SetLog(v string) *TestInvokeAuthorizerOutput {
	s.Log = &v
	return s
}
255554
func (l *Hierarchy) Log(kvs ...interface{}) {
	// Note: Log here messes up "caller" :/
	if logger := l.loadLogger(); logger != nil {
		logger.Log(kvs...)
	}
}
165047
func IsLogging(c context.Context, l Level) bool {
	return l >= GetLevel(c)
}
727490
func (p *Peer) shouldLogWriteError(err error) bool {
	// No logging when the peer is being forcibly disconnected.
	if atomic.LoadInt32(&p.disconnect) != 0 {
		return false
	}

	// No logging when the remote peer has been disconnected.
	if err == io.EOF {
		return false
	}
	if opErr, ok := err.(*net.OpError); ok && !opErr.Temporary() {
		return false
	}

	return true
}
977924
func (l *BeeLogger) mustLogDebug(message string, file string, line int, args ...interface{}) {
	if !debugMode {
		return
	}

	// Change the output to Stderr
	l.SetOutput(os.Stderr)

	// Create the log record
	record := LogRecord{
		ID:       fmt.Sprintf("%04d", atomic.AddUint64(&sequenceNo, 1)),
		Level:    l.getColorLevel(levelDebug),
		Message:  fmt.Sprintf(message, args...),
		LineNo:   line,
		Filename: filepath.Base(file),
	}
	err := debugLogRecordTemplate.Execute(l.output, record)
	if err != nil {
		panic(err)
	}
}
1373965
func (p *PeriodicDispatch) shouldRun() bool {
	p.l.RLock()
	defer p.l.RUnlock()
	return p.enabled
}
1262342
func (logger *Logger) log(level Level, v ...interface{}) {
	if int32(level) >= atomic.LoadInt32((*int32)(&logger.level)) {
		if logger.runtime || logger.sync {
			message := fmt.Sprint(v...)
			message = logger.genLog(level, message)
			logger.flushMsg(message)
		} else {
			r := new(request)
			r.level = level
			r.v = v
			logger.request <- *r
		}
	}
}
384159
def should_log(self, logger_name: str, level: str) -> bool:
        
        if (logger_name, level) not in self._should_log:
            log_level_per_rule = self._get_log_level(logger_name)
            log_level_per_rule_numeric = getattr(logging, log_level_per_rule.upper(), 10)
            log_level_event_numeric = getattr(logging, level.upper(), 10)

            should_log = log_level_event_numeric >= log_level_per_rule_numeric
            self._should_log[(logger_name, level)] = should_log
        return self._should_log[(logger_name, level)]
1041311
func (sink *ReconfigurableSink) Log(level LogLevel, log []byte) {
	minLogLevel := LogLevel(atomic.LoadInt32(&sink.minLogLevel))

	if level < minLogLevel {
		return
	}

	sink.sink.Log(level, log)
}