func (o *logger) SetPanicFunc(f func(string)) Logger {
	if f == nil {
		o.core.panicFunc = internal.EmptyPanicFunc
	} else {
		o.core.panicFunc = f
	}
	return o
}
SetPanicFunc sets the panic function of the current logger.
If the given function is nil, the panic function is disabled.
The panic function is called automatically after the PanicLevel level log is recorded.
By default, the panic function we use is func(s string) { panic(s) }.
package logger
import (
	"io"
	"os"
	"time"
	"github.com/edoger/zkits-logger/internal"
)
type Logger interface {
	Log
	GetLevel() Level
	SetLevel(Level) Logger
	SetOutput(io.Writer) Logger
	SetLevelOutput(Level, io.Writer) Logger
	SetLevelsOutput([]Level, io.Writer) Logger
	SetOutputInterceptor(func(Summary, io.Writer) (int, error)) Logger
	SetNowFunc(func() time.Time) Logger
	SetExitFunc(func(int)) Logger
	SetPanicFunc(func(string)) Logger
	SetFormatter(Formatter) Logger
	SetDefaultTimeFormat(string) Logger
	EnableCaller(...int) Logger
	EnableLevelCaller(Level, ...int) Logger
	EnableLevelsCaller([]Level, ...int) Logger
	AddHook(Hook) Logger
	AddHookFunc([]Level, func(Summary) error) Logger
	AsLog() Log
}
func New(name string) Logger {
	return &logger{log{core: newCore(name)}}
}
type logger struct {
	log
}
func (o *logger) GetLevel() Level {
	return o.core.level
}
func (o *logger) SetLevel(level Level) Logger {
	o.core.level = level
	return o
}
func (o *logger) SetOutput(w io.Writer) Logger {
	if w == nil {
		o.core.writer = os.Stdout
	} else {
		o.core.writer = w
	}
	return o
}
func (o *logger) SetLevelOutput(level Level, w io.Writer) Logger {
	o.core.levelWriter[level] = w
	return o
}
func (o *logger) SetLevelsOutput(levels []Level, w io.Writer) Logger {
	for i, j := 0, len(levels); i < j; i++ {
		o.SetLevelOutput(levels[i], w)
	}
	return o
}
func (o *logger) SetOutputInterceptor(f func(Summary, io.Writer) (int, error)) Logger {
	o.core.interceptor = f
	return o
}
func (o *logger) SetNowFunc(f func() time.Time) Logger {
	if f == nil {
		o.core.nowFunc = internal.DefaultNowFunc
	} else {
		o.core.nowFunc = f
	}
	return o
}
func (o *logger) SetExitFunc(f func(int)) Logger {
	if f == nil {
		o.core.exitFunc = internal.EmptyExitFunc
	} else {
		o.core.exitFunc = f
	}
	return o
}