修改错误变量名

master
ymm 2021-12-22 10:59:05 +08:00
parent 8925945571
commit 42beeb1c06
3 changed files with 4 additions and 4 deletions

View File

@ -1 +1 @@
log/2021-11-18.log
log/2021-12-22.log

View File

@ -1,6 +1,6 @@
package utils
const (
ConfigEnv = "GVA_CONFIG"
ConfigEnv = "GLOBAL_CONFIG"
ConfigFile = "config.yaml"
)

View File

@ -5,9 +5,9 @@ import (
"path"
"time"
"goweb-gin-demo/global"
zaprotatelogs "github.com/lestrrat-go/file-rotatelogs"
"go.uber.org/zap/zapcore"
"goweb-gin-demo/global"
)
//@author: [SliverHorn](https://github.com/SliverHorn)
@ -17,7 +17,7 @@ import (
func GetWriteSyncer() (zapcore.WriteSyncer, error) {
fileWriter, err := zaprotatelogs.New(
path.Join(global.GVA_CONFIG.Zap.Director, "%Y-%m-%d.log"),
path.Join(global.GLOBAL_CONFIG.Zap.Director, "%Y-%m-%d.log"),
zaprotatelogs.WithMaxAge(7*24*time.Hour),
zaprotatelogs.WithRotationTime(24*time.Hour),
)