// GetDebugInfo returns general debug info about the current process.
343007
func GetDebugInfo() (*DebugInfo, error) {
	h, err := windows.GetCurrentProcess()
	if err != nil {
		return nil, err
	}

	var token syscall.Token
	err = syscall.OpenProcessToken(syscall.Handle(h), syscall.TOKEN_QUERY, &token)
	if err != nil {
		return nil, err
	}

	privs, err := GetTokenPrivileges(token)
	if err != nil {
		return nil, err
	}

	user, err := GetTokenUser(token)
	if err != nil {
		return nil, err
	}

	return &DebugInfo{
		User:         user,
		ProcessPrivs: privs,
		OSVersion:    GetWindowsVersion(),
		Arch:         runtime.GOARCH,
		NumCPU:       runtime.NumCPU(),
	}, nil
}
1170528
func Debugf(format string, i ...interface{}) {
	if gLogLevel <= LDebug {
		logMessage("DEBUG - ", fmt.Sprintf(format, i...))
	}
}
1337123
func Debugf(format string, v ...interface{}) {
	if DefaultLogger.HasDebug() {
		DefaultLogger.Emit(-1, fmt.Sprintf(format, v...), nil)
	}
}
643110
func DebugLogging(c *Client) {
	c.Handlers.Send.Prepend(request.RequestLogger)
	c.Handlers.Send.Append(request.ResponseLogger)
}
1322444
func logDebug(source, format string, v ...interface{}) {
	if EnableDebugLogging {
		stdLogger.Printf(fmt.Sprintf("[DEBUG] %s %s", source, format), v...)
	}
}
859925
func (l *logger) Debugf(format string, a ...interface{}) {
	if !l.isDebug {
		return
	}
	l.printLog("[DEBUG]", format, a...)
}
1188874
func Debugf(format string, v ...interface{}) {
	if std.Level >= DebugLevel {
		std.Logger.Print(DebugLevel.String() + fmt.Sprintf(format, v...))
	}
}
884096
func (entry *Entry) Debugf(format string, args ...interface{}) {
	if entry.lgEntry.Logger.Level >= lg.DebugLevel {
		entry.lgEntry.WithFields(entry.fields).Debugf(format, args...)
	}
}
158735
func LogDebug(w io.Writer) {
	var initialized bool
	initDebugLoggerOnce.Do(func() {
		debugLogger = &logger{
			w: w,
		}
		initialized = true
	})

	if !initialized && debugLogger != nil {
		panic("LogDebug called multiple times. Can only be called once")
	}
}
456943
func debugInfo(level int) (file string) {
	var ok bool
	var line int
	_, file, line, ok = runtime.Caller(level)
	if ok {
		s := strings.Split(file, "/")
		length := len(s)
		if length >= 2 {
			file = strings.Join(s[length-2:length], "/") + ":" + strconv.Itoa(line)
		} else {
			file = s[0] + ":" + strconv.Itoa(line)
		}
	}
	return
}
268857
func SetDebugInfo(err error, meta metadata.MD) {
	if _, ok := err.(*trace.TraceErr); !ok {
		return
	}
	out, err := json.Marshal(err)
	if err != nil {
		return
	}
	meta[DebugReportMetadata] = []string{
		base64.StdEncoding.EncodeToString(out),
	}
}
967572
func Debugf(format string, v ...interface{}) {
	std.Fprint(std.flags, LEVEL_DEBUG, 2, fmt.Sprintf(format, v...), nil)
}
1102761
func NewMockDebugInfo(ctrl *gomock.Controller) *MockDebugInfo {
	mock := &MockDebugInfo{ctrl: ctrl}
	mock.recorder = &MockDebugInfoMockRecorder{mock}
	return mock
}
819566
func (_m *Logger) Debugf(format string, args ...interface{}) {
	var _ca []interface{}
	_ca = append(_ca, format)
	_ca = append(_ca, args...)
	_m.Called(_ca...)
}
829487
func (f *Fetcher) Debug() <-chan *DebugInfo {
	f.dbgmu.Lock()
	defer f.dbgmu.Unlock()
	f.debugging = true
	return f.dbg
}
1055333
func (l *SysLogger) Debugf(format string, v ...interface{}) {
	if l.debug {
		l.writer.Debug(fmt.Sprintf(format, v...))
	}
}
993827
func (s *SyslogLogger) Debugf(format string, v ...interface{}) {
	s.w.Debug(fmt.Sprintf(format, v...))
}