diff --git a/dsBaseRpc/Utils/LogUtil/LogUtil.go b/dsBaseRpc/Utils/LogUtil/LogUtil.go index 7b3cb0c5..b4d87d2f 100644 --- a/dsBaseRpc/Utils/LogUtil/LogUtil.go +++ b/dsBaseRpc/Utils/LogUtil/LogUtil.go @@ -14,14 +14,10 @@ import ( */ func Error(code string, msg string) { //判断是不是单元测试,如果是的话,那么配置文件的路径需要加上一个. - var logPath = "./Logs" - //判断文件不是存在(用于兼容单元测试不同的目录结构) - if !CommonUtil.Exists(logPath) { - logPath = "." + logPath - } + var logPath = "/usr/local/dsMin/dsBaseRpc/Logs" if !CommonUtil.Exists(logPath) { //创建 - os.Mkdir(logPath, os.ModePerm) + os.MkdirAll(logPath, os.ModePerm) } //设置手工日志的办法 logFile, err := os.OpenFile(logPath+"/dsBaseRpc.log", os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0644)