Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MongoDBConnectRetryMax int = 5
Functions ¶
func StartHttpServer ¶
func StartHttpServer(cfg *configs.ServerConfigStruct) error
StartHttpServer 启动服务器
func StartMongoDBConnection ¶
Types ¶
type CustomFileLogHooks ¶
type CustomFileLogHooks struct {
// contains filtered or unexported fields
}
func NewCustomFileLogHooks ¶
func NewCustomFileLogHooks(file string, level []log.Level) (*CustomFileLogHooks, error)
NewCustomFileLogHooks 初始化文件日志
Usage:
NewCustomFileLogHooks("app.log", log.AllLevels)
NewCustomFileLogHooks("app.log", []log.Level{
log.ErrorLevel,
log.PanicLevel,
})
func (*CustomFileLogHooks) Fire ¶
func (h *CustomFileLogHooks) Fire(entry *log.Entry) error
Fire 将日志写入到文件中
func (*CustomFileLogHooks) Levels ¶
func (h *CustomFileLogHooks) Levels() []log.Level
Levels 返回日志等级定义
Click to show internal directories.
Click to hide internal directories.