//IsEnabledFor - Check if given log level is enabled for given module
//  Parameters:
//  module is module name
//  level is logging level
//
//  Returns:
//  is logging enabled for this module and level
488219
func IsEnabledFor(module string, level Level) bool {
	return modlog.IsEnabledFor(module, api.Level(level))
}
577477
func (provider *Provider) IsEnabledForLevel(level Level) bool {
	return provider.IsEnabledForLevelAndKeywords(level, ^uint64(0))
}
662242
func (s *Server) IsDiagnosticEnabled() bool {
	s.Lock()
	defer s.Unlock()
	return s.enable == 1
}
79279
func IsDisabled(l Logger) bool {
	if l == nil {
		return true
	}
	if disable, ok := l.(Disableable); ok && disable.Disabled() {
		return true
	}
	return false
}
375800
func (_class HostClass) GetEnabled(sessionID SessionRef, self HostRef) (_retval bool, _err error) {
	_method := "host.get_enabled"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertHostRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _selfArg)
	if _err != nil {
		return
	}
	_retval, _err = convertBoolToGo(_method + " -> ", _result.Value)
	return
}
12809
func (c Config) PluginsEnabled() bool {
	return c.Bundle != nil || c.DecisionLogs != nil || c.Status != nil || len(c.Plugins) > 0
}
821260
func FieldpathEnabled(file *descriptor.FileDescriptorProto, message *descriptor.DescriptorProto) bool {
	return proto.GetBoolExtension(message.Options, E_Fieldpath, proto.GetBoolExtension(file.Options, E_FieldpathAll, false))
}
1156304
func (s *LoggingConfig) SetEnabled(v bool) *LoggingConfig {
	s.Enabled = &v
	return s
}
154560
func IsEnabledVersion(v unversioned.GroupVersion) bool {
	_, found := enabledVersions[v]
	return found
}
997818
func (s *LoggingStatus) SetLoggingEnabled(v bool) *LoggingStatus {
	s.LoggingEnabled = &v
	return s
}
896275
func (s *CreateTrailOutput) SetLogFileValidationEnabled(v bool) *CreateTrailOutput {
	s.LogFileValidationEnabled = &v
	return s
}
555906
func (module *BBAnalogModule) Enable() error {
	// once-off initialisation of analog
	if !module.analogInitialised {
		path, e := findFirstMatchingFile("/sys/devices/bone_capemgr.*/slots")
		if e != nil {
			return e
		}

		// determine if cape-bone-iio is already in the file. If so, we've already initialised it.
		if !module.hasCapeBoneIIO(path) {
			// enable analog
			e = WriteStringToFile(path, "cape-bone-iio")
			if e != nil {
				return e
			}
		}

		// determine path where analog files are
		path, e = findFirstMatchingFile("/sys/devices/ocp.*/helper.*/AIN0")
		if e != nil {
			return e
		}
		if path == "" {
			return errors.New("Could not locate /sys/devices/ocp.*/helper.*/AIN0")
		}

		// remove AIN0 to get the path where these files are
		module.analogValueFilesPath = strings.TrimSuffix(path, "AIN0")

		module.analogInitialised = true

		// attempt to assign all pins to this module
		for pin, _ := range module.definedPins {
			// attempt to assign this pin for this module.
			e = AssignPin(pin, module)
			if e != nil {
				return e
			}
		}
	}
	return nil
}
741621
func (s *InstanceMonitoring) SetEnabled(v bool) *InstanceMonitoring {
	s.Enabled = &v
	return s
}
1131038
func (s *AuditCheckConfiguration) SetEnabled(v bool) *AuditCheckConfiguration {
	s.Enabled = &v
	return s
}
964604
func (lf *LogForwarder) waitForEnabled() (bool, error) {
	lf.mu.Lock()
	enabled := lf.enabled
	lf.mu.Unlock()
	if enabled {
		return true, nil
	}

	select {
	case <-lf.catacomb.Dying():
		return false, tomb.ErrDying
	case enabled = <-lf.enabledCh:
	}
	lf.mu.Lock()
	defer lf.mu.Unlock()

	if !lf.enabled && enabled {
		logger.Infof("log forward enabled, starting to stream logs to syslog sink")
	}
	lf.enabled = enabled
	return enabled, nil
}
251049
func (s *ADMChannelRequest) SetEnabled(v bool) *ADMChannelRequest {
	s.Enabled = &v
	return s
}
165047
func IsLogging(c context.Context, l Level) bool {
	return l >= GetLevel(c)
}