func InitAppLogger(cfg *Config) (Logger, *pclog.ZapProperties, error) {
	logger, props, err := pclog.InitLogger(&pclog.Config{
		Level: cfg.Level,
		File: pclog.FileLogConfig{
			Filename:   cfg.File,
			MaxSize:    cfg.FileMaxSize,
			MaxDays:    cfg.FileMaxDays,
			MaxBackups: cfg.FileMaxBackups,
		},
		Format: cfg.Format,
	})
	if err != nil {
		return appLogger, props, errors.Trace(err)
	}
	return Logger{logger.WithOptions(zap.AddStacktrace(zap.DPanicLevel))}, props, nil
}
InitAppLogger inits the wrapped logger from config.
package log
import (
	"github.com/pingcap/errors"
	pclog "github.com/pingcap/log"
	"go.uber.org/zap"
)
var appLogger = Logger{zap.NewNop()}
type Logger struct {
	*zap.Logger
}
func Zap() Logger {
	return appLogger
}
type Config struct {
	Level string `toml:"level" json:"level"`
	File string `toml:"file" json:"file"`
	FileMaxSize int `toml:"max-size" json:"max-size"`
	FileMaxDays int `toml:"max-days" json:"max-days"`
	FileMaxBackups int `toml:"max-backups" json:"max-backups"`
	Format string `toml:"format" json:"format"`
}