From 14766682702c07f26c451f1b6bf2e3eb8a006a10 Mon Sep 17 00:00:00 2001
From: 龙赣华 <slongertian@gmail.com>
Date: 星期三, 22 五月 2019 11:51:56 +0800
Subject: [PATCH] modify filemaxage and filerotation between two file

---
 log/log.go                           |   49 +++++++++
 .gitignore                           |    0 
 go.sum                               |    2 
 log/log_record/info.log              |    1 
 test                                 |    0 
 log/log_record/info.log.201905221150 |   48 +++++++++
 go.mod                               |    1 
 esutil/EsClient.go                   |   28 +++-
 log/log_record/info.log.201905221149 |  156 +++++++++++++++++++++++++++++++
 9 files changed, 276 insertions(+), 9 deletions(-)

diff --git a/log/test.file b/.gitignore
similarity index 100%
rename from log/test.file
rename to .gitignore
diff --git a/esutil/EsClient.go b/esutil/EsClient.go
index 57fdb75..fdf50d6 100644
--- a/esutil/EsClient.go
+++ b/esutil/EsClient.go
@@ -2,6 +2,7 @@
 
 import (
 	"encoding/json"
+	"errors"
 	"fmt"
 	"io"
 	"io/ioutil"
@@ -14,11 +15,10 @@
 )
 
 func GetEsDataReq(url string, parama string, isSource bool) (error, map[string]interface{}) {
-	log.Log.Infoln("es 鏌ヨ璇锋眰璺緞" + url) //  閰嶇疆淇℃伅 鑾峰彇
+	//log.Log.Infoln("es 鏌ヨ璇锋眰璺緞" + url) //  閰嶇疆淇℃伅 鑾峰彇
 	req, err := http.NewRequest("POST", url, strings.NewReader(parama))
 
 	if err != nil {
-		log.Log.Errorln("build request error! ")
 		return err, nil
 	}
 
@@ -42,24 +42,34 @@
 	dec := json.NewDecoder(strings.NewReader(jsonStr))
 
 	if err := dec.Decode(&dat); err == io.EOF {
-		log.Log.Infoln(err.Error())
 		return err, nil
 	} else if err != nil {
-		log.Log.Errorln(err.Error())
 		return err, nil
 	}
 	// 鏄惁闇�瑕� 瑙f瀽 es 杩斿洖鐨� source
 	if isSource {
-		dat = dat["hits"].(map[string]interface{})
+		dat, ok := dat["hits"].(map[string]interface{})
+		if !ok {
+			return errors.New("data is not type of  map[string]interface{}"), nil
+		}
+
 		var data = make(map[string]interface{}, 2)
 		data["total"] = dat["total"]
 		sources := []interface{}{}
 		for _, value := range dat["hits"].([]interface{}) {
-			source := value.(map[string]interface{})["_source"].(map[string]interface{})
+			source, ok := value.(map[string]interface{})["_source"].(map[string]interface{})
+			if !ok {
+				return errors.New("value is not type of map[string]interface{}"), nil
+			}
+
 			source["id"] = value.(map[string]interface{})["_id"]
 			sdkType := source["sdkType"]
 			if sdkType != nil {
-				sdk, _ := strconv.Atoi(sdkType.(string))
+				sdk, err := strconv.Atoi(sdkType.(string))
+				if err != nil {
+					return err, nil
+				}
+
 				source["sdkType"] = sdkTypeToValue(sdk)
 			}
 			sources = append(sources, source)
@@ -85,8 +95,8 @@
 	seccond := strconv.Itoa(sec)
 
 	prama := "{\"query\":{\"bool\":{\"filter\":[{\"term\":{\"personIsHub\":\"1\"}},{\"range\":{\"picDate\":{\"gte\":\"now+8h-" + seccond + "s\",\"lt\":\"now+8h\"}}}]}},\"size\":\"1000\",\"sort\":[{\"picDate\":{\"order\":\"desc\"}}]," +
-		"\"_source\":[\"BaseName\",\"Gender\",\"Race\",\"content\",\"idcard\",\"picAddress\",\"picDate\",\"sdkType\",\"Age\",\"personId\",\"personIsHub\",\"personPicUrl\",\"picLocalUrl\",\"picSmUrl\",\"videoIp\",\"videoNum\",\"videoReqNum\",\"ageDescription\",\"likePer\",\"picMaxUrl\"]" + "}"
-
+		"\"_source\":[\"baseInfo\",\"gender\",\"indeviceName\",\"sdkType\",\"ageDescription\",\"content\",\"ID\",\"picAddress\",\"picMaxUrl\",\"picDate\",\"race\",\"videoNum\",\"picSmUrl\",\"taskName\",\"personIsHub\",\"IDCard\",\"videoIp\",\"videoReqNum\"]" +
+		"}"
 	err, tokenRes := GetEsDataReq(url, prama, true)
 	if err != nil {
 		log.Log.Errorln(err)
diff --git a/go.mod b/go.mod
index fcf016b..f761513 100644
--- a/go.mod
+++ b/go.mod
@@ -3,6 +3,7 @@
 go 1.12
 
 require (
+	github.com/jonboulle/clockwork v0.1.0 // indirect
 	github.com/lestrrat-go/file-rotatelogs v2.2.0+incompatible
 	github.com/lestrrat-go/strftime v0.0.0-20180821113735-8b31f9c59b0f // indirect
 	github.com/pkg/errors v0.8.1
diff --git a/go.sum b/go.sum
index 9c829c5..7ad115e 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,7 @@
 github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=
+github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
 github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
 github.com/lestrrat-go/file-rotatelogs v2.2.0+incompatible h1:eXEwY0f2h6mcobdAxm4VRSWds4tqmlLdUqxu8ybiEEA=
 github.com/lestrrat-go/file-rotatelogs v2.2.0+incompatible/go.mod h1:ZQnN8lSECaebrkQytbHj4xNgtg8CR7RYXnPok8e0EHA=
diff --git a/log/log.go b/log/log.go
new file mode 100644
index 0000000..401c443
--- /dev/null
+++ b/log/log.go
@@ -0,0 +1,49 @@
+package log
+
+import (
+	"io/ioutil"
+	"time"
+
+	rotatelogs "github.com/lestrrat-go/file-rotatelogs"
+	"github.com/rifflock/lfshook"
+	"github.com/sirupsen/logrus"
+)
+
+var Log *logrus.Logger
+
+func init() {
+	Log = NewLogger()
+}
+
+func NewLogger() *logrus.Logger {
+	if Log != nil {
+		return Log
+	}
+
+	infopath := "log/log_record/info.log"
+	infowriter, _ := rotatelogs.New(
+		infopath+".%Y%m%d%H%M",
+		rotatelogs.WithLinkName(infopath),
+		rotatelogs.WithMaxAge(30*24*time.Hour),
+		rotatelogs.WithRotationTime(24*time.Hour),
+	)
+
+	errorpath := "log/log_record/error.log"
+	errorwriter, _ := rotatelogs.New(
+		errorpath+".%Y%m%d%H%M",
+		rotatelogs.WithLinkName(errorpath),
+		rotatelogs.WithMaxAge(30*24*time.Hour),
+		rotatelogs.WithRotationTime(24*time.Hour),
+	)
+
+	Log = logrus.New()
+	Log.SetOutput(ioutil.Discard)
+	Log.Hooks.Add(lfshook.NewHook(
+		lfshook.WriterMap{
+			logrus.InfoLevel:  infowriter,
+			logrus.ErrorLevel: errorwriter,
+		},
+		&logrus.JSONFormatter{},
+	))
+	return Log
+}
diff --git a/log/log_record/info.log b/log/log_record/info.log
new file mode 120000
index 0000000..e3cb3ee
--- /dev/null
+++ b/log/log_record/info.log
@@ -0,0 +1 @@
+log/log_record/info.log.201905221150
\ No newline at end of file
diff --git a/log/log_record/info.log.201905221149 b/log/log_record/info.log.201905221149
new file mode 100644
index 0000000..b2067ba
--- /dev/null
+++ b/log/log_record/info.log.201905221149
@@ -0,0 +1,156 @@
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:00+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:00+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:02+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:02+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:02+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:02+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:02+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:02+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:02+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:02+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:03+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:03+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:03+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:03+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:03+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:03+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:04+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:04+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:04+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:04+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:04+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:04+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:08+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:08+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:08+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:08+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:10+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:10+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:12+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:12+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:12+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:12+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:12+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:12+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:12+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:12+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:13+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:13+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:13+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:13+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:13+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:13+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:14+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:14+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:14+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:14+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:14+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:14+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:18+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:18+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:18+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:18+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:20+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:20+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:22+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:22+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:22+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:22+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:22+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:22+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:22+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:22+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:23+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:23+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:23+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:23+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:23+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:23+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:24+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:24+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:24+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:24+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:24+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:24+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:28+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:28+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:28+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:28+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:30+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:30+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:32+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:32+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:32+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:32+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:32+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:32+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:32+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:32+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:33+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:33+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:33+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:33+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:33+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:33+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:34+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:34+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:34+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:34+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:34+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:34+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:38+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:38+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:38+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:38+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:40+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:40+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:42+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:42+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:42+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:42+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:42+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:42+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:42+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:42+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:43+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:43+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:43+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:43+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:43+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:43+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:44+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:44+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:44+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:44+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:44+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:44+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:48+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:48+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:48+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:48+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:50+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:50+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:52+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:52+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:52+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:52+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:52+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:52+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:52+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:52+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:53+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:53+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:53+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:53+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:53+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:53+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:54+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:54+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:54+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:54+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:54+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:54+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:58+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:58+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:49:58+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:49:58+08:00"}
diff --git a/log/log_record/info.log.201905221150 b/log/log_record/info.log.201905221150
new file mode 100644
index 0000000..3073aca
--- /dev/null
+++ b/log/log_record/info.log.201905221150
@@ -0,0 +1,48 @@
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:00+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:00+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:02+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:02+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:02+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:02+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:02+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:02+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:02+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:02+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:03+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:03+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:03+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:03+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:03+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:03+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:04+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:04+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:04+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:04+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:04+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:04+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:08+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:08+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:08+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:08+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:10+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:10+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:12+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:12+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:12+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:12+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:12+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:12+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:12+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:12+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:13+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:13+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:13+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:13+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:13+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:13+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:14+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:14+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:14+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:14+08:00"}
+{"level":"info","msg":"es 鏌ヨ璇锋眰璺緞http://192.168.1.182:9200/videopersons,personaction/_search","time":"2019-05-22T11:50:14+08:00"}
+{"level":"info","msg":"the data is nil","time":"2019-05-22T11:50:14+08:00"}
diff --git a/test b/test
index 265175f..9866c0c 100755
--- a/test
+++ b/test
Binary files differ

--
Gitblit v1.8.0