You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
771 B
Go
27 lines
771 B
Go
package logz
|
|
|
|
import (
|
|
"git.noahlan.cn/noahlan/ntool/nlog"
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
)
|
|
|
|
// WrapConf 转换 logx.LogConf 到 nlog.LogConf
|
|
func WrapConf(conf logx.LogConf) nlog.LogConf {
|
|
return nlog.LogConf{
|
|
ServiceName: conf.ServiceName,
|
|
Mode: conf.Mode,
|
|
Encoding: conf.Encoding,
|
|
TimeFormat: conf.TimeFormat,
|
|
Path: conf.Path,
|
|
Level: conf.Level,
|
|
MaxContentLength: conf.MaxContentLength,
|
|
Compress: conf.Compress,
|
|
Stat: conf.Stat,
|
|
KeepDays: conf.KeepDays,
|
|
StackCooldownMillis: conf.StackCooldownMillis,
|
|
MaxBackups: conf.MaxBackups,
|
|
MaxSize: conf.MaxSize,
|
|
Rotation: conf.Rotation,
|
|
}
|
|
}
|