func SetOut(w io.Writer) func() {
	return pkgFactory.SetOut(w)
}
SetOut sets the output writer for all logs produced by the default factory.
Returns a function which sets the output writer back to the prior setting.
package flume
import (
	"bytes"
	"encoding/json"
	"fmt"
	"github.com/ansel1/merry"
	"go.uber.org/zap/zapcore"
	"io"
	"strconv"
	"strings"
)
type (
	Logger interface {
		Debug(msg string, args ...interface{})
		Info(msg string, args ...interface{})
		Error(msg string, args ...interface{})
		IsDebug() bool
		IsInfo() bool
		With(args ...interface{}) Logger
	}
	Level zapcore.Level
)
const (
	OffLevel = Level(127)
	DebugLevel = Level(zapcore.DebugLevel)
	InfoLevel = Level(zapcore.InfoLevel)
	ErrorLevel = Level(zapcore.ErrorLevel)
)
var pkgFactory = NewFactory()
func New(name string) Logger {
	return pkgFactory.NewLogger(name)
}
func NewCore(name string, options ...CoreOption) *Core {
	return pkgFactory.NewCore(name, options...)
}
func ConfigString(s string) error {
	if strings.HasPrefix(strings.TrimSpace(s), "{") {
		cfg := Config{}
		err := json.Unmarshal([]byte(s), &cfg)
		if err != nil {
			return err
		}
		return Configure(cfg)
	}
	return pkgFactory.LevelsString(s)
}
func Configure(cfg Config) error {
	return pkgFactory.Configure(cfg)
}