Documentation ¶ Index ¶ Constants func InitBootstrap() *errors.Error func LogLevel(defaultLevel logrus.Level) logrus.Level func RegisterHandle(handler Handler) type Handler type Logger func NewLogger() (*Logger, *errors.Error) func (log *Logger) Logf(level logrus.Level, format string, argu ...interface{}) Constants ¶ View Source const ( PanicLevel logrus.Level = iota FatalLevel ErrorLevel WarnLevel InfoLevel DebugLevel ) Log 等级 Variables ¶ This section is empty. Functions ¶ func InitBootstrap ¶ func InitBootstrap() *errors.Error InitBootstrap 初始化 Bootstrap func LogLevel ¶ func LogLevel(defaultLevel logrus.Level) logrus.Level LogLevel 返回 Log 等级 func RegisterHandle ¶ func RegisterHandle(handler Handler) RegisterHandle 注册启动项 Types ¶ type Handler ¶ type Handler interface { Init() *errors.Error Name() string } Handler 注册额外的启动实例 type Logger ¶ type Logger struct { *logrus.Logger } Logger Log 包装 var Log *Logger Log 全局 Log func NewLogger ¶ func NewLogger() (*Logger, *errors.Error) NewLogger 初始化 Logger func (*Logger) Logf ¶ func (log *Logger) Logf(level logrus.Level, format string, argu ...interface{}) Logf 根据等级输出 Source Files ¶ View all Source files bootstrap.go logger.go Click to show internal directories. Click to hide internal directories.