fix: import cycle

This commit is contained in:
2023-01-18 18:02:58 +08:00
parent 26f46f1eb6
commit 6466292524
11 changed files with 122 additions and 126 deletions
+4 -4
View File
@@ -1,9 +1,9 @@
package logger
import (
"cutego/pkg/common"
"cutego/pkg/config"
"cutego/pkg/logging"
"cutego/pkg/util"
"fmt"
"github.com/druidcaesa/gotool"
"github.com/gin-gonic/gin"
@@ -17,10 +17,10 @@ import (
// LoggerToFile 日志记录到文件
func LoggerToFile() gin.HandlerFunc {
dirPath := common.GetDirPath("logging")
dirPath := config.GetDirPath("logging")
fileName := path.Join(dirPath, "application.logging")
if !common.IsFileOrDirExist(dirPath) {
err := common.CreateAllDir(dirPath)
if !util.IsFileOrDirExist(dirPath) {
err := util.CreateAllDir(dirPath)
if err != nil {
logging.ErrorLog(err)
}