Hi Manjunatha, 

Which file are you working on? 

1. For C++ in telephony DOM: /dom/telephony/*.cpp 

You could use __android_log_print() 
Ex: 

Add the following macro for LOG(), LOGI(), LOGW(). 
Then you could use them like => LOGI("dispatch call event: %s", 
NS_ConvertUTF16toUTF8(aType).get()); 

=========================================================== 
#if defined(MOZ_WIDGET_GONK) 

#include <android/log.h> 
#define LOG_TAG "Telephony" 

#undef __LOG 
#define __LOG(logType, args...) \ 
do { \ 
__android_log_print(ANDROID_LOG_##logType, LOG_TAG, args); \ 
} while (0) 

#define LOG(args...) __LOG(INFO, args) 
#define LOGI(args...) __LOG(INFO, args) 
#define LOGW(args...) __LOG(WARNING, args) 

#else 

#define LOG(args, ...) printf(args, ##__VA_ARGS__) 
#define LOGI(args, ...) printf(args, ##__VA_ARGS__) 
#define LOGW(args, ...) printf(args, ##__VA_ARGS__) 

#endif 
=========================================================== 

2. For TelephonyProvider.js and other related RIL file (dom/system/gonk/ 
RadioInterfaceLayer.js, ril_worker.js) 

There should be a defined debug() function in each file. Just use it. 


Best regards, 
Aknow 
-- 
Szu-Yu Chen (Aknow) 陳思佑 
Mozilla Taiwan 

----- Original Message -----

From: "Manjunatha M" <man...@gmail.com> 
To: dev-b2g@lists.mozilla.org 
Sent: Wednesday, November 6, 2013 4:30:37 PM 
Subject: [b2g] Logs in gecko 

Hi all, 

I am debugging an issue with respect to telephony. I was able to put logs 
in gaia. 

Now that I want to put logs in gecko. Can anyone let me how to put logs and 
get them in logcat. 

Thanks in advance, 

-- 
Regards, 
Manjunatha 
_______________________________________________ 
dev-b2g mailing list 
dev-b2g@lists.mozilla.org 
https://lists.mozilla.org/listinfo/dev-b2g 

_______________________________________________
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to