func New(lvl Level, out OutputFunc) Logger {
	if out == nil {
		out = logStd
	}
	return &LevelLogger{lvl: lvl, out: out}
}
New creates a new leveled logger instance with the given parameters.

If out is nil it uses the standard logger for output.
package logger
import (
	"fmt"
	"log"
	"strings"
)
type Logger interface {
	Errorf(format string, v ...interface{})
	Warnf(format string, v ...interface{})
	Infof(format string, v ...interface{})
	Debugf(format string, v ...interface{})
}
type Level uint8
const (
	LevelOff Level = iota
	LevelError
	LevelWarn
	LevelInfo
	LevelDebug
)
func (lvl Level) String() string {
	switch lvl {
	case LevelOff:
		return "OFF"
	case LevelError:
		return "ERROR"
	case LevelWarn:
		return "WARN"
	case LevelInfo:
		return "INFO"
	case LevelDebug:
		return "DEBUG"
	default:
		return fmt.Sprintf("UNKNOWN(%d)", lvl)
	}
}
type OutputFunc func(lvl Level, s string)