How to enable the debug traces for system\nfc\src files ?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to enable the debug traces for system\nfc\src files ?

Olivier L
Can you please point me some reading explaining how to enable the debug traces of a driver?

For example, I would like to enable the traces for system\nfc\src files. I can see that there are conditional traces like this:

DLOG_IF(INFO, nfc_debug_enabled) << __func__;

but I don't know how to enable them. Is it possible to enable them at runtime? 

"system\nfc\src\adaptation\NfcAdaptation.cc" contains a function called initializeGlobalDebugEnabledFlag() where the boolean nfc_debug_enabled is set according to a property called "nfc.debug_enabled" but I don't know how to change this property.

Thanks for your advices!

void initializeGlobalDebugEnabledFlag() {
  nfc_debug_enabled
=
     
(NfcConfig::getUnsigned(NAME_NFC_DEBUG_ENABLED, 0) != 0) ? true : false;


 
char valueStr[PROPERTY_VALUE_MAX] = {0};
 
int len = property_get("nfc.debug_enabled", valueStr, "");
 
if (len > 0) {
   
// let Android property override .conf variable
   
unsigned debug_enabled = 0;
    sscanf
(valueStr, "%u", &debug_enabled);
    nfc_debug_enabled
= (debug_enabled == 0) ? false : true;
 
}


  DLOG_IF
(INFO, nfc_debug_enabled)
     
<< StringPrintf("%s: level=%u", __func__, nfc_debug_enabled);
}


--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.