Documentation ¶ Index ¶ type AppHook func NewAppHook(name string) *AppHook func (s *AppHook) Fire(entry *logrus.Entry) error func (s *AppHook) Levels() []logrus.Level type Log func New(opt LogOpt) *Log func (l *Log) WrapError(err error) error type LogOpt Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type AppHook ¶ type AppHook struct { Name string } func NewAppHook ¶ func NewAppHook(name string) *AppHook func (*AppHook) Fire ¶ func (s *AppHook) Fire(entry *logrus.Entry) error func (*AppHook) Levels ¶ func (s *AppHook) Levels() []logrus.Level type Log ¶ type Log struct { *logrus.Logger } func New ¶ func New(opt LogOpt) *Log func (*Log) WrapError ¶ func (l *Log) WrapError(err error) error type LogOpt ¶ type LogOpt struct { LogPath string // 日志路径 Env string // 环境:dev开发环境 prod生产环境 } Source Files ¶ View all Source files app_hook.go log.go Click to show internal directories. Click to hide internal directories.