Commit 3e03aad2 by huangchengyi

1.0

parent c19edaa8
Showing with 1 additions and 2 deletions
...@@ -28,7 +28,6 @@ type SearchApiLog struct { ...@@ -28,7 +28,6 @@ type SearchApiLog struct {
} }
func AnalyzeSearchError(ctx *gin.Context,code int, ip, errMsg, file, line, method string) (log SearchApiLog) { func AnalyzeSearchError(ctx *gin.Context,code int, ip, errMsg, file, line, method string) (log SearchApiLog) {
return
//获取所有参数 //获取所有参数
request := make(map[string]string) request := make(map[string]string)
ctx.MultipartForm() ctx.MultipartForm()
...@@ -83,6 +82,7 @@ func (s *LogFormatter) Format(entry *log.Entry) ([]byte, error) { ...@@ -83,6 +82,7 @@ func (s *LogFormatter) Format(entry *log.Entry) ([]byte, error) {
//写入到特定的文件夹给ELK使用的日志 //写入到特定的文件夹给ELK使用的日志
func WriteSearchErrorLog(searchLog string) { func WriteSearchErrorLog(searchLog string) {
return;
// 设置日志格式为json格式 // 设置日志格式为json格式
log.SetFormatter(new(LogFormatter)) log.SetFormatter(new(LogFormatter))
path := "../logs/search/" path := "../logs/search/"
......
...@@ -29,7 +29,6 @@ func checkFileIsExist(filename string) bool { ...@@ -29,7 +29,6 @@ func checkFileIsExist(filename string) bool {
eg: logic.Loginfo("逾期统计开始","_yuqilv_"); eg: logic.Loginfo("逾期统计开始","_yuqilv_");
*/ */
func Log(writeString string,log_file_pre string) { func Log(writeString string,log_file_pre string) {
return
log_file_pre = "_"+log_file_pre log_file_pre = "_"+log_file_pre
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")
......
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