Commit c200c3a6 authored by Parkhi's avatar Parkhi Committed by Uze Choi

Update all of easysetup log message's level

 - Public API's log level is changed "INFO"
 - Internal API's log level is changed "DEBUG"
 - All of infomation which is Easysetup data is changed "INFO_PRIVATE" log level

Change-Id: I0eb97517be4da52fb0b202eb7c6379e85045a77d
Signed-off-by: default avatarParkhi <h_w.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17291Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarUze Choi <uzchoi@samsung.com>
Tested-by: default avatarUze Choi <uzchoi@samsung.com>
parent 32be85f9
......@@ -46,11 +46,11 @@ static ESDeviceProperty gESDeviceProperty;
void ESWiFiConfRsrcCallback(ESResult esResult, ESWiFiConfData *eventData)
{
OIC_LOG_V(DEBUG, ES_ENROLLEE_TAG, "ESWiFiConfRsrcCallback IN");
OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESWiFiConfRsrcCallback IN");
if(esResult != ES_OK)
{
OIC_LOG_V(ERROR, ES_ENROLLEE_TAG, "ESWiFiConfRsrcCallback Error Occured");
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "ESWiFiConfRsrcCallback Error Occured");
return;
}
......@@ -61,18 +61,18 @@ void ESWiFiConfRsrcCallback(ESResult esResult, ESWiFiConfData *eventData)
}
else
{
OIC_LOG_V(ERROR, ES_ENROLLEE_TAG, "WiFiConfProvCb is NULL");
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "WiFiConfProvCb is NULL");
return;
}
}
void ESCoapCloudConfRsrcCallback(ESResult esResult, ESCoapCloudConfData *eventData)
{
OIC_LOG_V(DEBUG, ES_ENROLLEE_TAG, "ESCoapCloudConfRsrcCallback IN");
OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESCoapCloudConfRsrcCallback IN");
if(esResult != ES_OK)
{
OIC_LOG_V(ERROR, ES_ENROLLEE_TAG, "ESCoapCloudConfRsrcCallback Error Occured");
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "ESCoapCloudConfRsrcCallback Error Occured");
return;
}
......@@ -82,18 +82,18 @@ void ESCoapCloudConfRsrcCallback(ESResult esResult, ESCoapCloudConfData *eventDa
}
else
{
OIC_LOG_V(ERROR, ES_ENROLLEE_TAG, "CoapCloudConfProvCb is NULL");
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "CoapCloudConfProvCb is NULL");
return;
}
}
void ESDevConfRsrcallback(ESResult esResult, ESDevConfData *eventData)
{
OIC_LOG_V(DEBUG, ES_ENROLLEE_TAG, "ESDevConfRsrcallback IN");
OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESDevConfRsrcallback IN");
if(esResult != ES_OK)
{
OIC_LOG_V(ERROR, ES_ENROLLEE_TAG, "ESDevConfRsrcallback Error Occured");
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "ESDevConfRsrcallback Error Occured");
return;
}
......@@ -103,7 +103,7 @@ void ESDevConfRsrcallback(ESResult esResult, ESDevConfData *eventData)
}
else
{
OIC_LOG_V(ERROR, ES_ENROLLEE_TAG, "DevConfProvCb is NULL");
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "DevConfProvCb is NULL");
return;
}
}
......@@ -185,14 +185,14 @@ ESResult ESSetDeviceProperty(ESDeviceProperty *deviceProperty)
while((deviceProperty->WiFi).mode[modeIdx] != WiFi_EOF)
{
(gESDeviceProperty.WiFi).mode[modeIdx] = (deviceProperty->WiFi).mode[modeIdx];
OIC_LOG_V(INFO, ES_ENROLLEE_TAG, "WiFi Mode : %d", (gESDeviceProperty.WiFi).mode[modeIdx]);
OIC_LOG_V(INFO_PRIVATE, ES_ENROLLEE_TAG, "WiFi Mode : %d", (gESDeviceProperty.WiFi).mode[modeIdx]);
modeIdx ++;
}
(gESDeviceProperty.WiFi).freq = (deviceProperty->WiFi).freq;
OIC_LOG_V(INFO, ES_ENROLLEE_TAG, "WiFi Freq : %d", (gESDeviceProperty.WiFi).freq);
OIC_LOG_V(INFO_PRIVATE, ES_ENROLLEE_TAG, "WiFi Freq : %d", (gESDeviceProperty.WiFi).freq);
OICStrcpy((gESDeviceProperty.DevConf).deviceName, OIC_STRING_MAX_VALUE, (deviceProperty->DevConf).deviceName);
OIC_LOG_V(INFO, ES_ENROLLEE_TAG, "Device Name : %s", (gESDeviceProperty.DevConf).deviceName);
OIC_LOG_V(INFO_PRIVATE, ES_ENROLLEE_TAG, "Device Name : %s", (gESDeviceProperty.DevConf).deviceName);
OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESSetDeviceProperty OUT");
return ES_OK;
......@@ -235,7 +235,7 @@ ESResult ESSetErrorCode(ESErrorCode esErrCode)
return ES_ERROR;
}
OIC_LOG_V(DEBUG, ES_ENROLLEE_TAG, "Set ESErrorCode succesfully : %d", esErrCode);
OIC_LOG_V(INFO, ES_ENROLLEE_TAG, "Set ESErrorCode succesfully : %d", esErrCode);
OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESSetErrorCode OUT");
return ES_OK;
}
......@@ -259,6 +259,8 @@ ESResult ESTerminateEnrollee()
ESResult ESSetCallbackForUserdata(ESReadUserdataCb readCb, ESWriteUserdataCb writeCb)
{
OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESSetCallbackForUserdata IN");
if(!readCb && !writeCb)
{
OIC_LOG(INFO, ES_ENROLLEE_TAG, "Both of callbacks for user data are null");
......
......@@ -97,7 +97,7 @@ ESResult SetCallbackForUserData(ESReadUserdataCb readCb, ESWriteUserdataCb write
{
if(!readCb && !writeCb)
{
OIC_LOG(INFO, ES_RH_TAG, "Both of callbacks for user data are null");
OIC_LOG(DEBUG, ES_RH_TAG, "Both of callbacks for user data are null");
return ES_ERROR;
}
gReadUserdataCb = readCb;
......@@ -157,31 +157,31 @@ OCStackResult initEasySetupResource(bool isSecured)
}
if(res != OC_STACK_OK)
{
OIC_LOG_V(INFO, ES_RH_TAG, "Created EasySetup resource with result: %s", getResult(res));
OIC_LOG_V(ERROR, ES_RH_TAG, "Created EasySetup resource with result: %s", getResult(res));
return res;
}
res = OCBindResourceTypeToResource(g_ESEasySetupResource.handle, OC_RSRVD_ES_RES_TYPE_COL);
if(res != OC_STACK_OK)
{
OIC_LOG_V(INFO, ES_RH_TAG, "Binding Resource type with result: %s", getResult(res));
OIC_LOG_V(ERROR, ES_RH_TAG, "Binding Resource type with result: %s", getResult(res));
return res;
}
res = OCBindResourceInterfaceToResource(g_ESEasySetupResource.handle, OC_RSRVD_INTERFACE_LL);
if(res != OC_STACK_OK)
{
OIC_LOG_V(INFO, ES_RH_TAG, "Binding Resource interface with result: %s", getResult(res));
OIC_LOG_V(ERROR, ES_RH_TAG, "Binding Resource interface with result: %s", getResult(res));
return res;
}
res = OCBindResourceInterfaceToResource(g_ESEasySetupResource.handle, OC_RSRVD_INTERFACE_BATCH);
if(res != OC_STACK_OK)
{
OIC_LOG_V(INFO, ES_RH_TAG, "Binding Resource interface with result: %s", getResult(res));
OIC_LOG_V(ERROR, ES_RH_TAG, "Binding Resource interface with result: %s", getResult(res));
return res;
}
OIC_LOG_V(INFO, ES_RH_TAG, "Created EasySetup resource with result: %s", getResult(res));
OIC_LOG_V(DEBUG, ES_RH_TAG, "Created EasySetup resource with result: %s", getResult(res));
return res;
}
......@@ -214,7 +214,7 @@ OCStackResult initWiFiConfResource(bool isSecured)
NULL, OC_DISCOVERABLE | OC_OBSERVABLE);
}
OIC_LOG_V(INFO, ES_RH_TAG, "Created WiFiConf resource with result: %s", getResult(res));
OIC_LOG_V(DEBUG, ES_RH_TAG, "Created WiFiConf resource with result: %s", getResult(res));
return res;
}
......@@ -243,7 +243,7 @@ OCStackResult initCoapCloudConfResource(bool isSecured)
NULL, OC_DISCOVERABLE | OC_OBSERVABLE);
}
OIC_LOG_V(INFO, ES_RH_TAG, "Created CoapCloudConf resource with result: %s", getResult(res));
OIC_LOG_V(DEBUG, ES_RH_TAG, "Created CoapCloudConf resource with result: %s", getResult(res));
return res;
}
......@@ -272,14 +272,14 @@ OCStackResult initDevConfResource(bool isSecured)
NULL, OC_DISCOVERABLE | OC_OBSERVABLE);
}
OIC_LOG_V(INFO, ES_RH_TAG, "Created DevConf resource with result: %s", getResult(res));
OIC_LOG_V(DEBUG, ES_RH_TAG, "Created DevConf resource with result: %s", getResult(res));
return res;
}
void updateEasySetupResource(OCEntityHandlerRequest* ehRequest, OCRepPayload* input)
{
OIC_LOG_V(INFO, ES_RH_TAG, "g_ESEasySetupResource.status %d", g_ESEasySetupResource.status);
OIC_LOG_V(DEBUG, ES_RH_TAG, "g_ESEasySetupResource.status %d", g_ESEasySetupResource.status);
if(ehRequest->query)
{
......@@ -314,7 +314,7 @@ void updateWiFiConfResource(OCRepPayload* input)
{
OICStrcpy(g_ESWiFiConfResource.ssid, sizeof(g_ESWiFiConfResource.ssid), ssid);
OICStrcpy(wiFiData->ssid, sizeof(wiFiData->ssid), ssid);
OIC_LOG_V(INFO, ES_RH_TAG, "g_ESWiFiConfResource.ssid : %s", g_ESWiFiConfResource.ssid);
OIC_LOG_V(INFO_PRIVATE, ES_RH_TAG, "g_ESWiFiConfResource.ssid : %s", g_ESWiFiConfResource.ssid);
}
char* cred = NULL;
......@@ -322,7 +322,7 @@ void updateWiFiConfResource(OCRepPayload* input)
{
OICStrcpy(g_ESWiFiConfResource.cred, sizeof(g_ESWiFiConfResource.cred), cred);
OICStrcpy(wiFiData->pwd, sizeof(wiFiData->pwd), cred);
OIC_LOG_V(INFO, ES_RH_TAG, "g_ESWiFiConfResource.cred %s", g_ESWiFiConfResource.cred);
OIC_LOG_V(INFO_PRIVATE, ES_RH_TAG, "g_ESWiFiConfResource.cred %s", g_ESWiFiConfResource.cred);
}
int64_t authType = -1;
......@@ -330,7 +330,7 @@ void updateWiFiConfResource(OCRepPayload* input)
{
g_ESWiFiConfResource.authType = authType;
wiFiData->authtype = g_ESWiFiConfResource.authType;
OIC_LOG_V(INFO, ES_RH_TAG, "g_ESWiFiConfResource.authType %u", g_ESWiFiConfResource.authType);
OIC_LOG_V(INFO_PRIVATE, ES_RH_TAG, "g_ESWiFiConfResource.authType %u", g_ESWiFiConfResource.authType);
}
int64_t encType = -1;
......@@ -338,7 +338,7 @@ void updateWiFiConfResource(OCRepPayload* input)
{
g_ESWiFiConfResource.encType = encType;
wiFiData->enctype = g_ESWiFiConfResource.encType;
OIC_LOG_V(INFO, ES_RH_TAG, "g_ESWiFiConfResource.encType %u", g_ESWiFiConfResource.encType);
OIC_LOG_V(INFO_PRIVATE, ES_RH_TAG, "g_ESWiFiConfResource.encType %u", g_ESWiFiConfResource.encType);
}
if(gReadUserdataCb)
......@@ -348,7 +348,7 @@ void updateWiFiConfResource(OCRepPayload* input)
if(ssid || cred || authType!= -1 || encType != -1)
{
OIC_LOG(INFO, ES_RH_TAG, "Send WiFiConfRsrc Callback To ES");
OIC_LOG(DEBUG, ES_RH_TAG, "Send WiFiConfRsrc Callback To ES");
// TODO : Need to check appropriateness of gWiFiData
if(gWifiConfRsrcEvtCb != NULL)
......@@ -363,7 +363,7 @@ void updateWiFiConfResource(OCRepPayload* input)
if(OC_STACK_NO_OBSERVERS == OCNotifyAllObservers(g_ESWiFiConfResource.handle, OC_HIGH_QOS))
{
OIC_LOG(INFO, ES_RH_TAG, "Enrollee doesn't have any observer.");
OIC_LOG(DEBUG, ES_RH_TAG, "Enrollee doesn't have any observer.");
}
OICFree(wiFiData);
......@@ -391,7 +391,7 @@ void updateCoapCloudConfResource(OCRepPayload* input)
{
OICStrcpy(g_ESCoapCloudConfResource.authCode, sizeof(g_ESCoapCloudConfResource.authCode), authCode);
OICStrcpy(cloudData->authCode, sizeof(cloudData->authCode), authCode);
OIC_LOG_V(INFO, ES_RH_TAG, "g_ESCoapCloudConfResource.authCode %s", g_ESCoapCloudConfResource.authCode);
OIC_LOG_V(INFO_PRIVATE, ES_RH_TAG, "g_ESCoapCloudConfResource.authCode %s", g_ESCoapCloudConfResource.authCode);
}
char *accessToken = NULL;
......@@ -399,7 +399,7 @@ void updateCoapCloudConfResource(OCRepPayload* input)
{
OICStrcpy(g_ESCoapCloudConfResource.accessToken, sizeof(g_ESCoapCloudConfResource.accessToken), accessToken);
OICStrcpy(cloudData->accessToken, sizeof(cloudData->accessToken), accessToken);
OIC_LOG_V(INFO, ES_RH_TAG, "g_ESCoapCloudConfResource.accessToken %s", g_ESCoapCloudConfResource.accessToken);
OIC_LOG_V(INFO_PRIVATE, ES_RH_TAG, "g_ESCoapCloudConfResource.accessToken %s", g_ESCoapCloudConfResource.accessToken);
}
int64_t accessTokenType = -1;
......@@ -407,7 +407,7 @@ void updateCoapCloudConfResource(OCRepPayload* input)
{
g_ESCoapCloudConfResource.accessTokenType = accessTokenType;
cloudData->accessTokenType = g_ESCoapCloudConfResource.accessTokenType;
OIC_LOG_V(INFO, ES_RH_TAG, "g_ESCoapCloudConfResource.accessTokenType %d", g_ESCoapCloudConfResource.accessTokenType);
OIC_LOG_V(INFO_PRIVATE, ES_RH_TAG, "g_ESCoapCloudConfResource.accessTokenType %d", g_ESCoapCloudConfResource.accessTokenType);
}
char *authProvider = NULL;
......@@ -415,7 +415,7 @@ void updateCoapCloudConfResource(OCRepPayload* input)
{
OICStrcpy(g_ESCoapCloudConfResource.authProvider, sizeof(g_ESCoapCloudConfResource.authProvider), authProvider);
OICStrcpy(cloudData->authProvider, sizeof(cloudData->authProvider), authProvider);
OIC_LOG_V(INFO, ES_RH_TAG, "g_ESCoapCloudConfResource.authServerUrl %s", g_ESCoapCloudConfResource.authProvider);
OIC_LOG_V(INFO_PRIVATE, ES_RH_TAG, "g_ESCoapCloudConfResource.authServerUrl %s", g_ESCoapCloudConfResource.authProvider);
}
char *ciServer = NULL;
......@@ -423,7 +423,7 @@ void updateCoapCloudConfResource(OCRepPayload* input)
{
OICStrcpy(g_ESCoapCloudConfResource.ciServer, sizeof(g_ESCoapCloudConfResource.ciServer), ciServer);
OICStrcpy(cloudData->ciServer, sizeof(cloudData->ciServer), ciServer);
OIC_LOG_V(INFO, ES_RH_TAG, "g_ESCoapCloudConfResource.ciServer %s", g_ESCoapCloudConfResource.ciServer);
OIC_LOG_V(INFO_PRIVATE, ES_RH_TAG, "g_ESCoapCloudConfResource.ciServer %s", g_ESCoapCloudConfResource.ciServer);
}
if(gReadUserdataCb)
......@@ -433,7 +433,7 @@ void updateCoapCloudConfResource(OCRepPayload* input)
if(authCode || accessToken || authProvider || ciServer)
{
OIC_LOG(INFO, ES_RH_TAG, "Send CoapCloudConfRsrc Callback To ES");
OIC_LOG(DEBUG, ES_RH_TAG, "Send CoapCloudConfRsrc Callback To ES");
// TODO : Need to check appropriateness of gCloudData
if(gCoapCloudConfRsrcEvtCb != NULL)
......@@ -442,13 +442,13 @@ void updateCoapCloudConfResource(OCRepPayload* input)
}
else
{
OIC_LOG(ERROR, ES_RH_TAG, "gCoapCloudConfRsrcEvtCb is NULL");
OIC_LOG(DEBUG, ES_RH_TAG, "gCoapCloudConfRsrcEvtCb is NULL");
}
}
if(OC_STACK_NO_OBSERVERS == OCNotifyAllObservers(g_ESCoapCloudConfResource.handle, OC_HIGH_QOS))
{
OIC_LOG(INFO, ES_RH_TAG, "CoapCloudConf resource doesn't have any observer.");
OIC_LOG(DEBUG, ES_RH_TAG, "CoapCloudConf resource doesn't have any observer.");
}
OICFree(cloudData);
......@@ -472,7 +472,7 @@ void updateDevConfResource(OCRepPayload* input)
{
OICStrcpy(g_ESDevConfResource.location, sizeof(g_ESDevConfResource.location), location);
OICStrcpy(devConfData->location, sizeof(devConfData->location), location);
OIC_LOG_V(INFO, ES_RH_TAG, "g_ESDevConfResource.location %s", g_ESDevConfResource.location);
OIC_LOG_V(INFO_PRIVATE, ES_RH_TAG, "g_ESDevConfResource.location %s", g_ESDevConfResource.location);
}
char *country = NULL;
......@@ -480,7 +480,7 @@ void updateDevConfResource(OCRepPayload* input)
{
OICStrcpy(g_ESDevConfResource.country, sizeof(g_ESDevConfResource.country), country);
OICStrcpy(devConfData->country, sizeof(devConfData->country), country);
OIC_LOG_V(INFO, ES_RH_TAG, "g_ESDevConfResource.country %s", g_ESDevConfResource.country);
OIC_LOG_V(INFO_PRIVATE, ES_RH_TAG, "g_ESDevConfResource.country %s", g_ESDevConfResource.country);
}
char *language = NULL;
......@@ -488,7 +488,7 @@ void updateDevConfResource(OCRepPayload* input)
{
OICStrcpy(g_ESDevConfResource.language, sizeof(g_ESDevConfResource.language), language);
OICStrcpy(devConfData->language, sizeof(devConfData->language), language);
OIC_LOG_V(INFO, ES_RH_TAG, "g_ESDevConfResource.language %s", g_ESDevConfResource.language);
OIC_LOG_V(INFO_PRIVATE, ES_RH_TAG, "g_ESDevConfResource.language %s", g_ESDevConfResource.language);
}
if(gReadUserdataCb)
......@@ -498,7 +498,7 @@ void updateDevConfResource(OCRepPayload* input)
if(country || language)
{
OIC_LOG(INFO, ES_RH_TAG, "Send DevConfRsrc Callback To ES");
OIC_LOG(DEBUG, ES_RH_TAG, "Send DevConfRsrc Callback To ES");
// TODO : Need to check appropriateness of gDevConfData
if(gDevConfRsrcEvtCb != NULL)
......@@ -507,13 +507,13 @@ void updateDevConfResource(OCRepPayload* input)
}
else
{
OIC_LOG(ERROR, ES_RH_TAG, "gDevConfRsrcEvtCb is NULL");
OIC_LOG(DEBUG, ES_RH_TAG, "gDevConfRsrcEvtCb is NULL");
}
}
if(OC_STACK_NO_OBSERVERS == OCNotifyAllObservers(g_ESDevConfResource.handle, OC_HIGH_QOS))
{
OIC_LOG(INFO, ES_RH_TAG, "devConfResource doesn't have any observer.");
OIC_LOG(DEBUG, ES_RH_TAG, "devConfResource doesn't have any observer.");
}
OICFree(devConfData);
......@@ -534,7 +534,7 @@ OCRepPayload* constructResponseOfWiFiConf(char *interface)
return NULL;
}
OIC_LOG(INFO, ES_RH_TAG, "constructResponse WiFiConf res");
OIC_LOG(DEBUG, ES_RH_TAG, "constructResponse WiFiConf res");
OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_WIFICONF);
OCRepPayload* repPayload = NULL;
......@@ -614,7 +614,7 @@ OCRepPayload* constructResponseOfCoapCloudConf(char *interface)
return NULL;
}
OIC_LOG(INFO, ES_RH_TAG, "constructResponse CoapCloudConf res");
OIC_LOG(DEBUG, ES_RH_TAG, "constructResponse CoapCloudConf res");
OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_COAPCLOUDCONF);
OCRepPayload* repPayload = NULL;
......@@ -686,7 +686,7 @@ OCRepPayload* constructResponseOfDevConf(char *interface)
return NULL;
}
OIC_LOG(INFO, ES_RH_TAG, "constructResponse DevConf res");
OIC_LOG(DEBUG, ES_RH_TAG, "constructResponse DevConf res");
OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_DEVCONF);
OCRepPayload* repPayload = NULL;
......@@ -931,7 +931,7 @@ OCRepPayload* constructResponseOfEasySetup(OCEntityHandlerRequest *ehRequest)
(ehRequest->query && !strcmp(ehRequest->query, "")) ||
(ehRequest->query && CompareResourceInterface(ehRequest->query, OC_RSRVD_INTERFACE_DEFAULT)))
{
OIC_LOG(INFO, ES_RH_TAG, "constructResponse EasySetup res");
OIC_LOG(DEBUG, ES_RH_TAG, "constructResponse EasySetup res");
OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_EASYSETUP);
OCRepPayloadAddInterface(payload, OC_RSRVD_INTERFACE_DEFAULT);
OCRepPayloadAddInterface(payload, OC_RSRVD_INTERFACE_LL);
......@@ -957,7 +957,7 @@ OCRepPayload* constructResponseOfEasySetup(OCEntityHandlerRequest *ehRequest)
ehRequest->query && CompareResourceInterface(ehRequest->query, OC_RSRVD_INTERFACE_BATCH))
{
OIC_LOG(INFO, ES_RH_TAG, "constructResponse EasySetup res");
OIC_LOG(DEBUG, ES_RH_TAG, "constructResponse EasySetup res");
OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_EASYSETUP);
OCRepPayload* repPayload = NULL;
......@@ -1118,7 +1118,7 @@ OCStackResult CreateEasySetupResources(bool isSecured, ESResourceMask resourceMa
}
OIC_LOG_V(INFO, ES_RH_TAG, "Created all resources with result: %s", getResult(res));
OIC_LOG_V(DEBUG, ES_RH_TAG, "Created all resources with result: %s", getResult(res));
return res;
}
......@@ -1274,7 +1274,7 @@ OCEntityHandlerResult ProcessGetRequest(OCEntityHandlerRequest *ehRequest, OCRep
OCEntityHandlerResult ProcessPostRequest(OCEntityHandlerRequest *ehRequest, OCRepPayload** payload)
{
OIC_LOG(INFO, ES_RH_TAG, "ProcessPostRequest enter");
OIC_LOG(DEBUG, ES_RH_TAG, "ProcessPostRequest enter");
OCEntityHandlerResult ehResult = OC_EH_ERROR;
if (ehRequest->payload && ehRequest->payload->type != PAYLOAD_TYPE_REPRESENTATION)
{
......@@ -1399,12 +1399,12 @@ OCEntityHandlerResult OCEntityHandlerCb(OCEntityHandlerFlag flag,
{
if (OC_REST_GET == entityHandlerRequest->method)
{
OIC_LOG(INFO, ES_RH_TAG, "Received GET request");
OIC_LOG(DEBUG, ES_RH_TAG, "Received GET request");
ehRet = ProcessGetRequest(entityHandlerRequest, &payload);
}
else if (OC_REST_PUT == entityHandlerRequest->method)
{
OIC_LOG(INFO, ES_RH_TAG, "Received PUT request");
OIC_LOG(DEBUG, ES_RH_TAG, "Received PUT request");
//PUT request will be handled in the internal implementation
if (g_ESEasySetupResource.handle != NULL)
......@@ -1419,7 +1419,7 @@ OCEntityHandlerResult OCEntityHandlerCb(OCEntityHandlerFlag flag,
}
else if (OC_REST_POST == entityHandlerRequest->method)
{
OIC_LOG(INFO, ES_RH_TAG, "Received OC_REST_POST from client");
OIC_LOG(DEBUG, ES_RH_TAG, "Received OC_REST_POST from client");
if (g_ESEasySetupResource.handle != NULL)
{
ehRet = ProcessPostRequest(entityHandlerRequest, &payload);
......@@ -1453,15 +1453,15 @@ OCEntityHandlerResult OCEntityHandlerCb(OCEntityHandlerFlag flag,
}
if (entityHandlerRequest && (flag & OC_OBSERVE_FLAG))
{
OIC_LOG(INFO, ES_RH_TAG, "Flag includes OC_OBSERVE_FLAG");
OIC_LOG(DEBUG, ES_RH_TAG, "Flag includes OC_OBSERVE_FLAG");
if (OC_OBSERVE_REGISTER == entityHandlerRequest->obsInfo.action)
{
OIC_LOG (INFO, ES_RH_TAG, "Received OC_OBSERVE_REGISTER from Mediator");
OIC_LOG(DEBUG, ES_RH_TAG, "Received OC_OBSERVE_REGISTER from Mediator");
}
else if (OC_OBSERVE_DEREGISTER == entityHandlerRequest->obsInfo.action)
{
OIC_LOG (INFO, ES_RH_TAG, "Received OC_OBSERVE_DEREGISTER from Mediator");
OIC_LOG(DEBUG, ES_RH_TAG, "Received OC_OBSERVE_DEREGISTER from Mediator");
}
}
return ehRet;
......@@ -1469,70 +1469,70 @@ OCEntityHandlerResult OCEntityHandlerCb(OCEntityHandlerFlag flag,
OCStackResult SetDeviceProperty(ESDeviceProperty *deviceProperty)
{
OIC_LOG(INFO, ES_RH_TAG, "SetDeviceProperty IN");
OIC_LOG(DEBUG, ES_RH_TAG, "SetDeviceProperty IN");
g_ESWiFiConfResource.supportedFreq = (deviceProperty->WiFi).freq;
OIC_LOG_V(INFO, ES_RH_TAG, "WiFi Freq : %d", g_ESWiFiConfResource.supportedFreq);
OIC_LOG_V(INFO_PRIVATE, ES_RH_TAG, "WiFi Freq : %d", g_ESWiFiConfResource.supportedFreq);
int modeIdx = 0;
while((deviceProperty->WiFi).mode[modeIdx] != WiFi_EOF)
{
g_ESWiFiConfResource.supportedMode[modeIdx] = (deviceProperty->WiFi).mode[modeIdx];
OIC_LOG_V(INFO, ES_RH_TAG, "WiFi Mode : %d", g_ESWiFiConfResource.supportedMode[modeIdx]);
OIC_LOG_V(INFO_PRIVATE, ES_RH_TAG, "WiFi Mode : %d", g_ESWiFiConfResource.supportedMode[modeIdx]);
modeIdx ++;
}
g_ESWiFiConfResource.numMode = modeIdx;
OICStrcpy(g_ESDevConfResource.devName, OIC_STRING_MAX_VALUE, (deviceProperty->DevConf).deviceName);
OIC_LOG_V(INFO, ES_RH_TAG, "Device Name : %s", g_ESDevConfResource.devName);
OIC_LOG_V(INFO_PRIVATE, ES_RH_TAG, "Device Name : %s", g_ESDevConfResource.devName);
OICStrcpy(g_ESDevConfResource.modelNumber, OIC_STRING_MAX_VALUE,
(deviceProperty->DevConf).modelNumber);
OIC_LOG_V(INFO, ES_RH_TAG, "Model Number : %s", g_ESDevConfResource.modelNumber);
OIC_LOG_V(INFO_PRIVATE, ES_RH_TAG, "Model Number : %s", g_ESDevConfResource.modelNumber);
if(OC_STACK_NO_OBSERVERS == OCNotifyAllObservers(g_ESWiFiConfResource.handle, OC_HIGH_QOS))
{
OIC_LOG(INFO, ES_RH_TAG, "wifiResource doesn't have any observers.");
OIC_LOG(DEBUG, ES_RH_TAG, "wifiResource doesn't have any observers.");
}
if(OC_STACK_NO_OBSERVERS == OCNotifyAllObservers(g_ESDevConfResource.handle, OC_HIGH_QOS))
{
OIC_LOG(INFO, ES_RH_TAG, "devConfResource doesn't have any observers.");
OIC_LOG(DEBUG, ES_RH_TAG, "devConfResource doesn't have any observers.");
}
OIC_LOG(INFO, ES_RH_TAG, "SetDeviceProperty OUT");
OIC_LOG(DEBUG, ES_RH_TAG, "SetDeviceProperty OUT");
return OC_STACK_OK;
}
OCStackResult SetEnrolleeState(ESEnrolleeState esState)
{
OIC_LOG(INFO, ES_RH_TAG, "SetEnrolleeState IN");
OIC_LOG(DEBUG, ES_RH_TAG, "SetEnrolleeState IN");
g_ESEasySetupResource.status = esState;
OIC_LOG_V(INFO, ES_RH_TAG, "Enrollee Status : %d", g_ESEasySetupResource.status);
OIC_LOG_V(INFO_PRIVATE, ES_RH_TAG, "Enrollee Status : %d", g_ESEasySetupResource.status);
if(OC_STACK_NO_OBSERVERS == OCNotifyAllObservers(g_ESEasySetupResource.handle, OC_HIGH_QOS))
{
OIC_LOG(INFO, ES_RH_TAG, "provResource doesn't have any observers.");
OIC_LOG(DEBUG, ES_RH_TAG, "provResource doesn't have any observers.");
}
OIC_LOG(INFO, ES_RH_TAG, "SetEnrolleeState OUT");
OIC_LOG(DEBUG, ES_RH_TAG, "SetEnrolleeState OUT");
return OC_STACK_OK;
}
OCStackResult SetEnrolleeErrCode(ESErrorCode esErrCode)
{
OIC_LOG(INFO, ES_RH_TAG, "SetEnrolleeErrCode IN");
OIC_LOG(DEBUG, ES_RH_TAG, "SetEnrolleeErrCode IN");
g_ESEasySetupResource.lastErrCode = esErrCode;
OIC_LOG_V(INFO, ES_RH_TAG, "Enrollee ErrorCode : %d", g_ESEasySetupResource.lastErrCode);
OIC_LOG_V(INFO_PRIVATE, ES_RH_TAG, "Enrollee ErrorCode : %d", g_ESEasySetupResource.lastErrCode);
if(OC_STACK_NO_OBSERVERS == OCNotifyAllObservers(g_ESEasySetupResource.handle, OC_HIGH_QOS))
{
OIC_LOG(INFO, ES_RH_TAG, "provResource doesn't have any observers.");
OIC_LOG(DEBUG, ES_RH_TAG, "provResource doesn't have any observers.");
}
OIC_LOG(INFO, ES_RH_TAG, "SetEnrolleeErrCode OUT");
OIC_LOG(DEBUG, ES_RH_TAG, "SetEnrolleeErrCode OUT");
return OC_STACK_OK;
}
......
......@@ -46,7 +46,7 @@ namespace OIC
ESCloudResourceCb cb,
std::weak_ptr<CloudResource> this_ptr)
{
OIC_LOG_V(DEBUG, ES_CLOUD_RES_TAG, "onCloudProvResponseSafetyCb");
OIC_LOG(DEBUG, ES_CLOUD_RES_TAG, "onCloudProvResponseSafetyCb");
std::shared_ptr<CloudResource> Ptr = this_ptr.lock();
if(Ptr)
{
......@@ -57,7 +57,7 @@ namespace OIC
void CloudResource::provisionProperties(const CloudProp& cloudProp)
{
OIC_LOG (DEBUG, ES_CLOUD_RES_TAG, "provisionProperties IN");
OIC_LOG(DEBUG, ES_CLOUD_RES_TAG, "provisionProperties IN");
OCRepresentation provisioningRepresentation = cloudProp.toOCRepresentation();
......@@ -71,13 +71,13 @@ namespace OIC
m_ocResource->post(OC_RSRVD_ES_RES_TYPE_EASYSETUP, BATCH_INTERFACE,
provisioningRepresentation, QueryParamsMap(), cb, OC::QualityOfService::HighQos);
OIC_LOG (DEBUG, ES_CLOUD_RES_TAG, "provisionProperties OUT");
OIC_LOG(DEBUG, ES_CLOUD_RES_TAG, "provisionProperties OUT");
}
void CloudResource::onCloudProvResponse(const HeaderOptions& /*headerOptions*/,
const OCRepresentation& /*rep*/, const int eCode)
{
OIC_LOG_V (DEBUG, ES_CLOUD_RES_TAG, "onCloudProvResponse : eCode = %d",
OIC_LOG_V(DEBUG, ES_CLOUD_RES_TAG, "onCloudProvResponse : eCode = %d",
eCode);
if (eCode > OCStackResult::OC_STACK_RESOURCE_CHANGED)
......@@ -88,7 +88,7 @@ namespace OIC
if(eCode == OCStackResult::OC_STACK_COMM_ERROR)
{
OIC_LOG_V (DEBUG, ES_CLOUD_RES_TAG,
OIC_LOG(DEBUG, ES_CLOUD_RES_TAG,
"can't receive any response from Enrollee by a timeout threshold.");
result = ESResult::ES_COMMUNICATION_ERROR;
}
......
......@@ -50,7 +50,7 @@ namespace OIC
std::shared_ptr<RemoteEnrollee> EasySetup::createRemoteEnrollee (std::shared_ptr< OC::OCResource > resource)
{
OIC_LOG(DEBUG, EASYSETUP_TAG, "createRemoteEnrollee IN");
OIC_LOG(INFO, EASYSETUP_TAG, "createRemoteEnrollee IN");
if(resource)
{
......@@ -66,11 +66,11 @@ namespace OIC
{
if(interface.compare(BATCH_INTERFACE) == 0)
{
OIC_LOG (DEBUG, EASYSETUP_TAG, "RemoteEnrollee object is succeessfully created");
OIC_LOG_V (DEBUG, EASYSETUP_TAG, "HOST: %s", resource->host().c_str());
OIC_LOG_V (DEBUG, EASYSETUP_TAG, "URI: %s", resource->uri().c_str());
OIC_LOG_V (DEBUG, EASYSETUP_TAG, "SID: %s", resource->sid().c_str());
OIC_LOG_V (DEBUG, EASYSETUP_TAG, "CONNECTIVITY: %d", resource->connectivityType());
OIC_LOG (INFO, EASYSETUP_TAG, "RemoteEnrollee object is succeessfully created");
OIC_LOG_V (INFO_PRIVATE, EASYSETUP_TAG, "HOST: %s", resource->host().c_str());
OIC_LOG_V (INFO_PRIVATE, EASYSETUP_TAG, "URI: %s", resource->uri().c_str());
OIC_LOG_V (INFO_PRIVATE, EASYSETUP_TAG, "SID: %s", resource->sid().c_str());
OIC_LOG_V (INFO_PRIVATE, EASYSETUP_TAG, "CONNECTIVITY: %d", resource->connectivityType());
return std::shared_ptr< RemoteEnrollee > (new RemoteEnrollee(resource));
}
}
......
......@@ -44,7 +44,7 @@ namespace OIC
ESEnrolleeResourceCb cb,
std::weak_ptr<EnrolleeResource> this_ptr)
{
OIC_LOG_V(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "onEnrolleeResourceSafetyCB");
OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "onEnrolleeResourceSafetyCB");
std::shared_ptr<EnrolleeResource> Ptr = this_ptr.lock();
if(Ptr)
{
......@@ -55,19 +55,19 @@ namespace OIC
void EnrolleeResource::onProvisioningResponse(const HeaderOptions& /*headerOptions*/,
const OCRepresentation& /*rep*/, const int eCode)
{
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "onProvisioningResponse : eCode = %d",
OIC_LOG_V(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "onProvisioningResponse : eCode = %d",
eCode);