Commit 27f0c4a2 by huangchengyi

1.0

parent e691f13f
Showing with 5 additions and 5 deletions
......@@ -48,9 +48,9 @@ func Output(ctx *gin.Context,errCode int, errMsg string, data interface{}) {
ErrMsg: errMsg,
Data: data,
}
if errCode >= 100 {
SearchApiLogger(ctx,errCode, errMsg)
}
//if errCode >= 100 {
// //SearchApiLogger(ctx,errCode, errMsg)
//}
if ctx.DefaultQuery("callback", "") != "" {
ctx.JSONP(200, response)
} else {
......
......@@ -34,8 +34,8 @@ func Log(writeString string,log_file_pre string,types int) {
date := time.Now().Format("2006-01-02")
date2 := time.Now().Format("2006-01-02 15:04:05")
path,_:=os.Getwd()
CreateDateDir(path,"mylogs")
var filename = path+"/mylogs/"+date+log_file_pre+".txt"
CreateDateDir(path,"logs")
var filename = path+"/logs/"+date+log_file_pre+".txt"
var f *os.File
var err1 error
if checkFileIsExist(filename) { //如果文件存在
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment