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{}) { ...@@ -48,9 +48,9 @@ func Output(ctx *gin.Context,errCode int, errMsg string, data interface{}) {
ErrMsg: errMsg, ErrMsg: errMsg,
Data: data, Data: data,
} }
if errCode >= 100 { //if errCode >= 100 {
SearchApiLogger(ctx,errCode, errMsg) // //SearchApiLogger(ctx,errCode, errMsg)
} //}
if ctx.DefaultQuery("callback", "") != "" { if ctx.DefaultQuery("callback", "") != "" {
ctx.JSONP(200, response) ctx.JSONP(200, response)
} else { } else {
......
...@@ -34,8 +34,8 @@ func Log(writeString string,log_file_pre string,types int) { ...@@ -34,8 +34,8 @@ func Log(writeString string,log_file_pre string,types int) {
date := time.Now().Format("2006-01-02") date := time.Now().Format("2006-01-02")
date2 := time.Now().Format("2006-01-02 15:04:05") date2 := time.Now().Format("2006-01-02 15:04:05")
path,_:=os.Getwd() path,_:=os.Getwd()
CreateDateDir(path,"mylogs") CreateDateDir(path,"logs")
var filename = path+"/mylogs/"+date+log_file_pre+".txt" var filename = path+"/logs/"+date+log_file_pre+".txt"
var f *os.File var f *os.File
var err1 error var err1 error
if checkFileIsExist(filename) { //如果文件存在 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