[logging] remove aInstance as input parameter to logging macros (#3184)

This commit is contained in:
Abtin Keshavarzian
2018-10-25 09:14:43 -07:00
committed by Jonathan Hui
parent f0b5245f88
commit 309bd09d75
64 changed files with 1159 additions and 1303 deletions
+1 -34
View File
@@ -51,7 +51,7 @@ otInstance *otInstanceInit(void *aInstanceBuffer, size_t *aInstanceBufferSize)
Instance *instance;
instance = Instance::Init(aInstanceBuffer, aInstanceBufferSize);
otLogInfoApi(*instance, "otInstance Initialized");
otLogInfoApi("otInstance Initialized");
return instance;
}
@@ -117,39 +117,6 @@ otError otInstanceErasePersistentInfo(otInstance *aInstance)
}
#endif // OPENTHREAD_MTD || OPENTHREAD_FTD
otLogLevel otGetDynamicLogLevel(otInstance *aInstance)
{
otLogLevel logLevel;
#if OPENTHREAD_CONFIG_ENABLE_DYNAMIC_LOG_LEVEL
Instance &instance = *static_cast<Instance *>(aInstance);
logLevel = instance.GetDynamicLogLevel();
#else
logLevel = static_cast<otLogLevel>(OPENTHREAD_CONFIG_LOG_LEVEL);
OT_UNUSED_VARIABLE(aInstance);
#endif
return logLevel;
}
otError otSetDynamicLogLevel(otInstance *aInstance, otLogLevel aLogLevel)
{
otError error = OT_ERROR_NONE;
#if OPENTHREAD_CONFIG_ENABLE_DYNAMIC_LOG_LEVEL
Instance &instance = *static_cast<Instance *>(aInstance);
instance.SetDynamicLogLevel(aLogLevel);
#else
error = OT_ERROR_DISABLED_FEATURE;
OT_UNUSED_VARIABLE(aInstance);
OT_UNUSED_VARIABLE(aLogLevel);
#endif
return error;
}
const char *otGetVersionString(void)
{
/**