如何在 android chromium 中打印日志?
How to print the log in android chromium?
我是新手android chromium,需要在里面打印log msg,那么android chromium怎么打印log,可以用哪个接口打印日志?
在android chromium中有几种打印日志的方法,你试试这两种流畅的方法:
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";
我是新手android chromium,需要在里面打印log msg,那么android chromium怎么打印log,可以用哪个接口打印日志?
在android chromium中有几种打印日志的方法,你试试这两种流畅的方法:
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";