From 99bfea5d5a36522a3bd60d9a82a3c87ad30ed2c8 Mon Sep 17 00:00:00 2001 From: fish Date: Mon, 12 Aug 2019 17:44:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=9F=E5=A7=8Bdata=20log=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E6=96=87=E4=BB=B6prefix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worker.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/worker.go b/worker.go index 5a80c6c..5286c10 100644 --- a/worker.go +++ b/worker.go @@ -27,7 +27,8 @@ type Device struct { } type baseMessage struct{ - + Ip string `json:"ip"` + } //处理通过tcp发送过来的数据 @@ -143,7 +144,7 @@ func record_log(data_buf []byte){ } record := log.New(f,"",log.Llongfile) //debugLog.SetPrefix("[Debug]") - record.SetFlags(log.Ldate | log.Ltime | log.Lshortfile) + record.SetFlags(log.Ldate | log.Ltime) record.Println(data_buf) }