package com.cc;

import org.apache.commons.lang3.StringUtils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import com.linecorp.bot.model.event.Event;
import com.linecorp.bot.model.event.MessageEvent;
import com.linecorp.bot.model.event.message.TextMessageContent;
import com.linecorp.bot.model.message.TextMessage;
import com.linecorp.bot.spring.boot.annotation.EventMapping;
import com.linecorp.bot.spring.boot.annotation.LineMessageHandler;

@SpringBootApplication
@LineMessageHandler
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @EventMapping
    public TextMessage handleTextMessageEvent(MessageEvent<TextMessageContent> event) {
        System.out.println("event: " + event);
        String mesg = event.getMessage().getText();
        if (StringUtils.isNotBlank(mesg)) {
        	String userId = event.getSource().getUserId();
        	return new TextMessage("說話的人是->" + userId);
        } else {
        	return null;
        }
    }

    @EventMapping
    public void handleDefaultMessageEvent(Event event) {
        System.out.println("event: " + event);
    }
}

@@ -55,16 +55,73 @@
 gUtils;%0A
+import org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A
 import o
@@ -858,38 +858,122 @@
 ) %7B%0A    
-    System.out.println
+%09final Logger slf4jLogger = LoggerFactory.getLogger(%22com.linecorp.bot.client.wire%22);%0A    %09slf4jLogger.info
 (%22event:
@@ -1094,105 +1094,118 @@
    %09
-String userId = event.getSource().getUserId();%0A        %09return new TextMessage(%22%E8%AA%AA%E8%A9%B1%E7%9A%84%E4%BA%BA%E6%98%AF-%3E%22 + userId
+return new TextMessage(String.format(%22Source=%7B%25s%7D, ReplyToken=%7B%25s%7D%22, event.getSource(), event.getReplyToken())
 );%0A 

print log