mirror of
https://github.com/espressif/openthread.git
synced 2026-07-09 05:40:27 +00:00
[logging] remove aInstance as input parameter to logging macros (#3184)
This commit is contained in:
committed by
Jonathan Hui
parent
f0b5245f88
commit
309bd09d75
@@ -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)
|
||||
{
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user