func NewLogger(channellen int64, stealLevel ...int) *BeeLogger {
	bl := new(BeeLogger)
	bl.level = LevelDebug
	bl.loggerFuncCallDepth = 2
	bl.msg = make(chan *logMsg, channellen)
	bl.outputs = make(map[string]LoggerInterface)
	bl.status = WORK
	bl.steal = make(chan *logMsg, channellen)
	if len(stealLevel) > 0 {
		bl.stealLevelPreset = stealLevel[0]
	} else {
		bl.stealLevelPreset = LevelNothing
	}
	return bl
}
NewLogger returns a new BeeLogger.
channellen means the number of messages in chan.
if the buffering chan is full, logger adapters write to file or other way.
package logs
import (
	"errors"
	"fmt"
	"path"
	"runtime"
	"sync"
)
const (
	LevelNothing = iota - 1
	LevelApp      
	LevelEmergency
	LevelAlert
	LevelCritical
	LevelError
	LevelWarning
	LevelNotice
	LevelInformational
	LevelDebug
)
type loggerType func() LoggerInterface
type LoggerInterface interface {
	Init(config map[string]interface{}) error
	WriteMsg(msg string, level int) error
	Destroy()
	Flush()
}
var adapters = make(map[string]loggerType)
func Register(name string, log loggerType) {
	if log == nil {
		panic("logs: Register provide is nil")
	}
	adapters[name] = log
}
const (
	NULL = iota - 1
	WORK
	REST
	CLOSE
)
type BeeLogger struct {
	lock                sync.RWMutex
	level               int
	enableFuncCallDepth bool
	loggerFuncCallDepth int
	asynchronous        bool
	msg                 chan *logMsg
	steal               chan *logMsg
	stealLevel          int
	stealLevelPreset    int
	outputs             map[string]LoggerInterface
	status              int
}
type logMsg struct {
	level int
	msg   string
}