Compare commits
No commits in common. "fff01c44055613c787243bd8421012cb19afc4ba" and "e536831e80418119ab6889189a2f1cf470c1a2ac" have entirely different histories.
fff01c4405
...
e536831e80
@ -24,7 +24,7 @@ type InputLogConfig struct {
|
||||
Path string `json:"path" yaml:"path"` // 日志文件路径
|
||||
TimeIntervalType TimeIntervalType `json:"time_interval_type" yaml:"time_interval_type"` // 日志切割规则
|
||||
DivisionChar string `json:"division_char" yaml:"division_char"` // 文件名分隔符
|
||||
LogLevel int `json:"log_level" yaml:"log_level"` // 日志等级
|
||||
LogLevel zapcore.Level `json:"log_level" yaml:"log_level"` // 日志等级
|
||||
Console bool `json:"console" yaml:"console"` // 是否进行控制台日志输出
|
||||
UseJson bool `json:"use_json" yaml:"use_json"` // 日志是否使用JSON格式
|
||||
FileLine bool `json:"file_line" yaml:"file_line"` // 日志是否打印行号
|
||||
@ -69,7 +69,7 @@ func GetLogInstanceFromInputConfig(logConf *InputLogConfig) (*zap.Logger, error)
|
||||
WithMaxAge(time.Duration(logConf.MaxAge)*time.Second)); nil != err {
|
||||
return nil, err
|
||||
}
|
||||
if loggerInstance, err = NewLogger(zapcore.Level(logConf.LogLevel), splitConfig, logConfList...); nil != err {
|
||||
if loggerInstance, err = NewLogger(logConf.LogLevel, splitConfig, logConfList...); nil != err {
|
||||
return nil, err
|
||||
}
|
||||
return loggerInstance, nil
|
||||
|
Loading…
Reference in New Issue
Block a user