升级枚举值定义
This commit is contained in:
@ -70,7 +70,7 @@ type WSServerConfig struct {
|
||||
LogPath string // 日志路径
|
||||
LogFile string // 日志文件名
|
||||
LogLevel zapcore.Level // 日志等级
|
||||
LogSplitInterval string // 日至切割的时间间隔
|
||||
LogSplitInterval consts.LogSplit // 日至切割的时间间隔
|
||||
StoreConnection bool // 存储连接
|
||||
ConnectionManager storage.IConnection // 连接管理实例
|
||||
EnablePprof bool // 开启pprof, 默认关闭
|
||||
@ -90,7 +90,7 @@ type SetWSServerConfig func(wsc *WSServerConfig)
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 7:25 下午 2021/4/17
|
||||
func SetWSServerLogEnable(logPath string, logFile string, logLevel zapcore.Level, splitInterval string) SetWSServerConfig {
|
||||
func SetWSServerLogEnable(logPath string, logFile string, logLevel zapcore.Level, splitInterval consts.LogSplit) SetWSServerConfig {
|
||||
return func(wsc *WSServerConfig) {
|
||||
if len(logPath) == 0 {
|
||||
logPath = "./logs"
|
||||
|
Reference in New Issue
Block a user