// SimpleFSSetDebugLevel implements the SimpleFSInterface.
490240
func (k *SimpleFS) SimpleFSSetDebugLevel(
	_ context.Context, level string) error {
	k.config.SetVLogLevel(level)
	return nil
}
546593
func isDebugMode() bool {
	v, _ := strconv.ParseBool(os.Getenv(teleport.DebugEnvVar))
	return v
}
1195000
func (b *simple) Debugln(msg ...interface{}) {
	a := fmt.Sprintln(msg...)
	stdlog.Println("[DEBUG]", a[:len(a)-1], pretty(b.fields))
}
1308870
func (s *MonitoringConfigurationDescription) SetMetricsLevel(v string) *MonitoringConfigurationDescription {
	s.MetricsLevel = &v
	return s
}
1171051
func Debugf(format string, a ...interface{}) {
	if !debug {
		return
	}
	output("[DEBG]", fmt.Sprintf(format, a...))
}
609144
func (t *Tracer) isDebugAllowed(operation string) bool {
	return t.debugThrottler.IsAllowed(operation)
}
310067
func (k *SimpleFS) SimpleFSCancel(_ context.Context, opid keybase1.OpID) error {
	k.lock.Lock()
	defer k.lock.Unlock()
	delete(k.handles, opid)
	w, ok := k.inProgress[opid]
	if !ok {
		return nil
	}
	delete(k.inProgress, opid)
	w.cancel()
	return nil
}
898742
func (gitter *Gitter) SetDebug(debug bool, logWriter io.Writer) {
	gitter.debug = debug
	gitter.logWriter = logWriter
}
656449
func Debugln(v ...interface{}) {
	if std.Level >= DebugLevel {
		std.Logger.Println(DebugLevel.String() + fmt.Sprint(v...))
	}
}
660100
func (l *Logger) Debugln(v ...interface{}) {
	l.Fprint(l.flags, LEVEL_DEBUG, 2, fmt.Sprintln(v...), nil)
}
1188874
func Debugf(format string, v ...interface{}) {
	if std.Level >= DebugLevel {
		std.Logger.Print(DebugLevel.String() + fmt.Sprintf(format, v...))
	}
}
38322
func (k *SimpleFS) SimpleFSOpen(ctx context.Context, arg keybase1.SimpleFSOpenArg) (err error) {
	ctx, err = k.startSyncOp(ctx, "Open", arg)
	if err != nil {
		return err
	}
	defer func() { k.doneSyncOp(ctx, err) }()

	fs, finalElem, err := k.getFS(ctx, arg.Dest)
	if err != nil {
		return err
	}

	// Make a directory if needed.  This will return `nil` if the
	// directory already exists.
	if arg.Flags&keybase1.OpenFlags_DIRECTORY != 0 {
		return fs.MkdirAll(finalElem, 0755)
	}

	var cflags = os.O_RDONLY
	// This must be first since it writes the flag, not just ORs into it.
	if arg.Flags&keybase1.OpenFlags_WRITE != 0 {
		cflags = os.O_RDWR
	}
	if arg.Flags&keybase1.OpenFlags_EXISTING == 0 {
		cflags |= os.O_CREATE
	}
	if arg.Flags&keybase1.OpenFlags_REPLACE != 0 {
		cflags |= os.O_TRUNC
	}

	var cancel context.CancelFunc = func() {}
	if libfs, ok := fs.(*libfs.FS); ok {
		var fsCtx context.Context
		fsCtx, cancel = context.WithCancel(k.makeContext(context.Background()))
		fsCtx, err := k.startOpWrapContext(fsCtx)
		if err != nil {
			return err
		}
		libfs = libfs.WithContext(fsCtx)
		k.log.CDebugf(ctx, "New background context for open: SFSID=%s, OpID=%X",
			fsCtx.Value(ctxIDKey), arg.OpID)
		fs = libfs
	}

	f, err := fs.OpenFile(finalElem, cflags, 0644)
	if err != nil {
		return err
	}

	k.lock.Lock()
	k.handles[arg.OpID] = &handle{file: f, path: arg.Dest, cancel: cancel}
	k.lock.Unlock()

	return nil
}
1350769
func (s *RaidArray) SetRaidLevel(v int64) *RaidArray {
	s.RaidLevel = &v
	return s
}
91858
func getBugLink(c *router.Context, b *buildbucketpb.Build) (string, error) {
	project, err := common.GetProject(c.Context, b.Builder.GetProject())
	if err != nil || proto.Equal(&project.BuildBugTemplate, &config.BugTemplate{}) {
		return "", err
	}

	builderPath := fmt.Sprintf("/p/%s/builders/%s/%s", b.Builder.GetProject(), b.Builder.GetBucket(), b.Builder.GetBuilder())
	buildURL, err := c.Request.URL.Parse(builderPath + "/" + c.Params.ByName("numberOrId"))
	if err != nil {
		return "", errors.Annotate(err, "Unable to make build URL for build bug link.").Err()
	}
	builderURL, err := c.Request.URL.Parse(builderPath)
	if err != nil {
		return "", errors.Annotate(err, "Unable to make builder URL for build bug link.").Err()
	}

	return MakeBuildBugLink(&project.BuildBugTemplate, map[string]interface{}{
		"Build":          b,
		"MiloBuildUrl":   buildURL,
		"MiloBuilderUrl": builderURL,
	})
}
1301863
func (api *Client) Debugln(v ...interface{}) {
	if api.debug {
		api.log.Output(2, fmt.Sprintln(v...))
	}
}
1078879
func (l *Logger) Debugf(format string, v ...interface{}) {
	l.Fprint(l.flags, LEVEL_DEBUG, 2, fmt.Sprintf(format, v...), nil)
}
1359332
func (c *Conn) SetDebug(w io.Writer) {
	c.debug = w
	c.init()
}