From 27274019daad45e208e36c138172f63ae4f9f0a2 Mon Sep 17 00:00:00 2001 From: Jay Chen Date: Tue, 25 Jun 2019 20:56:52 +0800 Subject: [PATCH] add log --- module/line-message/message-event.go | 2 ++ module/line-message/message-type.go | 1 + router/line/line.go | 2 ++ 3 files changed, 5 insertions(+) diff --git a/module/line-message/message-event.go b/module/line-message/message-event.go index 6167543..6e32486 100644 --- a/module/line-message/message-event.go +++ b/module/line-message/message-event.go @@ -2,12 +2,14 @@ package linemsg import ( "fmt" + "log" lineobj "git.trj.tw/golang/mtfosbot/module/line-message/line-object" ) // MessageEvent - func MessageEvent(botid string, e *lineobj.EventObject) { + log.Println("proc message evt :: ", botid, *e) if len(botid) == 0 { return } diff --git a/module/line-message/message-type.go b/module/line-message/message-type.go index 0c78253..12b62cc 100644 --- a/module/line-message/message-type.go +++ b/module/line-message/message-type.go @@ -17,6 +17,7 @@ import ( ) func messageType(botid string, e *lineobj.EventObject) { + log.Println("proc msg type text :: ", botid) msg := e.Message mtype, ok := msg["type"] if !ok { diff --git a/router/line/line.go b/router/line/line.go index ed008ec..b79373e 100644 --- a/router/line/line.go +++ b/router/line/line.go @@ -6,6 +6,7 @@ import ( "encoding/base64" "encoding/json" "io/ioutil" + "log" "git.trj.tw/golang/mtfosbot/model" "git.trj.tw/golang/mtfosbot/module/context" @@ -100,6 +101,7 @@ func GetLineMessage(c *context.Context) { if len(events.Events) > 0 { for _, v := range events.Events { + log.Println("get line message :: ", v) go linemsg.MessageEvent(botid, v) } }