func (nl ConsoleLogger) Debug(format string, a ...interface{}) {
	fmt.Fprintf(nl.output(), format, a...)
}
Debug in the null logger does nothing
package main
import (
	"fmt"
	"io"
	"os"
)
type LogLevel int
const (
	Debug LogLevel = iota
	Info
	Warning
	Error
)
type Logger interface {
	Info(format string, a ...interface{})
	Warning(format string, a ...interface{})
	Error(format string, a ...interface{})
	Fatalf(format string, a ...interface{})
	Debug(format string, a ...interface{})
	Level(level LogLevel)
}
type ConsoleLogger struct {
	W io.Writer
}
func (nl *ConsoleLogger) SetOutput(w io.Writer) {
	nl.W = w
}
func (nl ConsoleLogger) output() io.Writer {
	if nl.W == nil {
		return os.Stderr
	}
	return nl.W
}