// SetDebugWriter sets the io.Writer where the Graph will record debug
// information. After this is set, the graph will immediately encode itself to
// the stream, and continue to record all subsequent operations.
518004
func (g *Graph) SetDebugWriter(w io.Writer) {
	g.debug = &encoder{w: w}
	g.debug.Encode(newMarshalGraph("root", g))
}
167639
func NewDebugWriter(local, remote io.Writer) io.Writer {
	return &debugWriter{Writer: local, local: local, remote: remote}
}
26045
func (session *Session) Debug() DebugMode {
	if session.debug != DEBUG_OFF {
		return session.debug
	}

	return Debug
}
1154200
func (writer *MultiWriter) Debugf(format string, args ...interface{}) {
	_, ok := writer.writers[DEBUG]
	if !ok || DEBUG < writer.level {
		return
	}

	writer.writef(DEBUG, format, args...)
}
1044932
func WithDebug(w io.Writer) ServerOption {
	return func(s *Server) error {
		s.debugStream = w
		return nil
	}
}
771573
func (s *Logging) SetWriter(w io.Writer) {
	var sw zapcore.WriteSyncer
	switch t := w.(type) {
	case *os.File:
		sw = zapcore.Lock(t)
	case zapcore.WriteSyncer:
		sw = t
	default:
		sw = zapcore.AddSync(w)
	}

	s.mutex.Lock()
	s.writer = sw
	s.mutex.Unlock()
}
1345722
func (l *CompositeLogger) Debug(v ...interface{}) {
	for _, log := range l.loggers {
		log.Debug(v...)
	}
}
1329152
func DebugPrint(w io.Writer, node Node) error {
	p := debugPrinter{out: w}
	p.print(reflect.ValueOf(node))
	return p.err
}
279282
func (dbch debugBatch) Write() {
	fmt.Printf("%v.batch.Write()\n", dbch.label)
	dbch.bch.Write()
}
360931
func (e *Echo) SetDebug(on bool) {
	e.debug = on
	if logger, ok := e.logger.(logger.LevelSetter); ok {
		if on {
			logger.SetLevel(`Debug`)
		} else {
			logger.SetLevel(`Info`)
		}
	}
}
179086
func (w *Writer) Debug(m string) (err error) {
	_, err = w.writeAndRetry(LOG_DEBUG, m)
	return err
}
209987
func (s *XPackWatcherExecuteWatchService) Debug(debug bool) *XPackWatcherExecuteWatchService {
	s.debug = &debug
	return s
}
820839
func Debug(v ...interface{}) {
	std.Fprint(std.flags, LEVEL_DEBUG, 2, fmt.Sprint(v...), nil)
}
1129366
func SetSQLDebug(dbMap *gorp.DbMap, log blog.Logger) {
	dbMap.TraceOn("SQL: ", &SQLLogger{log})
}
578668
func writeDebugInfo(w io.Writer) {
	fmt.Fprintf(w, "Runtime stats\n")
	runtimeStats(w)

	fmt.Fprintf(w, "Memory stats\n")
	memStats(w)

	fmt.Fprintf(w, "Goroutines\n")
	goroutineDump(w)
}
759855
func (c *Consumer) Debug(msg string) {
	if c != nil && c.OnMessage != nil {
		c.OnMessage("debug", msg)
	}
}
882556
func (session *Session) SetDebug(debug DebugMode) DebugMode {
	old := session.debug
	session.debug = debug
	return old
}