2017-02-10 176 views

回答

1

有几种方法可以打印在日志中的Android铬,并尝试在两个流动方式:

1. The first way:  
//Add the head file 
#include <cutils/log.h> 
#define XLOGC(...) android_printLog(ANDROID_LOG_DEBUG, "Your Tags", __VA_ARGS__) 

//use the XLOGC to print the log 
XLOGC("Your log message"); 


2. The second way: 
//Add the head file 
#include "base/logging.h" 
LOG(INFO) << "Your log message";