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;
}
}
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;
}
}
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;
}
}
else
{
- OIC_LOG_V(ERROR, ES_ENROLLEE_TAG, "DevConfProvCb is NULL");
+ OIC_LOG(ERROR, ES_ENROLLEE_TAG, "DevConfProvCb is NULL");
return;
}
}
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;
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;
}
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");
{
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;
}
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;
}
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;
}
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;
}
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)
{
{
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;
{
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;
{
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;
{
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)
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)
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);
{
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;
{
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;
{
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;
{
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;
{
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)
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)
}
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);
{
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;
{
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;
{
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)
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)
}
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);
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;
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;
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;
(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);
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;
}
- 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;
}
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)
{
{
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)
}
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);
}
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;
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;
}
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)
{
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();
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)
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;
}
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)
{
{
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));
}
}
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)
{
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);
if (eCode > OCStackResult::OC_STACK_RESOURCE_CHANGED)
{
ESResult result = ESResult::ES_ERROR;
- OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
+ OIC_LOG(ERROR, ES_REMOTE_ENROLLEE_RES_TAG,
"onProvisioningResponse : Provisioning is failed ");
if(eCode == OCStackResult::OC_STACK_COMM_ERROR)
{
- OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
+ OIC_LOG(ERROR, ES_REMOTE_ENROLLEE_RES_TAG,
"can't receive any response from Enrollee by a timeout threshold.");
result = ESResult::ES_COMMUNICATION_ERROR;
}
return;
}
- OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
+ OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
"onProvisioningResponse : Provisioning is success. ");
std::shared_ptr< DevicePropProvisioningStatus > provStatus = std::make_shared<
void EnrolleeResource::onGetStatusResponse(const HeaderOptions& /*headerOptions*/,
const OCRepresentation& rep, const int eCode)
{
- OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "onGetStatusResponse : eCode = %d",
+ OIC_LOG_V(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "onGetStatusResponse : eCode = %d",
eCode);
if (eCode > OCStackResult::OC_STACK_RESOURCE_CHANGED)
{
ESResult result = ESResult::ES_ERROR;
- OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
+ OIC_LOG(ERROR, ES_REMOTE_ENROLLEE_RES_TAG,
"onGetStatusResponse : onGetStatusResponse is failed ");
if(eCode == OCStackResult::OC_STACK_COMM_ERROR)
{
- OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
+ OIC_LOG(ERROR, ES_REMOTE_ENROLLEE_RES_TAG,
"can't receive any response from Enrollee by a timeout threshold.");
result = ESResult::ES_COMMUNICATION_ERROR;
}
void EnrolleeResource::onGetConfigurationResponse(const HeaderOptions& /*headerOptions*/,
const OCRepresentation& rep, const int eCode)
{
- OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "onGetConfigurationResponse : eCode = %d",
+ OIC_LOG_V(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "onGetConfigurationResponse : eCode = %d",
eCode);
if (eCode > OCStackResult::OC_STACK_RESOURCE_CHANGED)
{
ESResult result = ESResult::ES_ERROR;
- OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
+ OIC_LOG(ERROR, ES_REMOTE_ENROLLEE_RES_TAG,
"onGetConfigurationResponse : onGetConfigurationResponse is failed ");
if(eCode == OCStackResult::OC_STACK_COMM_ERROR)
{
- OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
+ OIC_LOG(ERROR, ES_REMOTE_ENROLLEE_RES_TAG,
"can't receive any response from Enrollee by a timeout threshold.");
result = ESResult::ES_COMMUNICATION_ERROR;
}
void EnrolleeResource::getStatus()
{
- OIC_LOG (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "getStatus IN");
+ OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "getStatus IN");
if (m_ocResource == nullptr)
{
return;
}
- OIC_LOG (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "getStatus OUT");
+ OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "getStatus OUT");
}
void EnrolleeResource::getConfiguration()
{
- OIC_LOG (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "getConfiguration IN");
+ OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "getConfiguration IN");
if (m_ocResource == nullptr)
{
return;
}
- OIC_LOG (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "getConfiguration OUT");
+ OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "getConfiguration OUT");
}
void EnrolleeResource::provisionProperties(const DeviceProp& deviceProp)
{
- OIC_LOG (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "provisionProperties IN");
+ OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "provisionProperties IN");
if (m_ocResource == nullptr)
{
throw ESBadRequestException("Resource is not initialized");
m_ocResource->post(OC_RSRVD_ES_RES_TYPE_EASYSETUP, BATCH_INTERFACE,
provisioningRepresentation, QueryParamsMap(), cb, OC::QualityOfService::HighQos);
- OIC_LOG (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "provisionProperties OUT");
+ OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "provisionProperties OUT");
}
}
}
ESSecurityCb cb,
std::weak_ptr<EnrolleeSecurity> this_ptr)
{
- OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "onEnrolleeSecuritySafetyCB");
+ OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "onEnrolleeSecuritySafetyCB");
std::shared_ptr<EnrolleeSecurity> Ptr = this_ptr.lock();
if(Ptr)
{
ownerID = {};
}
- OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Mediator ID %s", m_mediatorID.c_str());
- OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Enrollee's Owner ID %s", ownerID.c_str());
+ OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "Mediator ID %s", m_mediatorID.c_str());
+ OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "Enrollee's Owner ID %s", ownerID.c_str());
if(ownerID == m_mediatorID)
{
- OIC_LOG(INFO, ENROLEE_SECURITY_TAG,
+ OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG,
"The found device's first owner ID is matched with Mediator's ID");
ret = true;
}
else
{
- OIC_LOG(INFO, ENROLEE_SECURITY_TAG,
+ OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG,
"The found device's first owner ID is NOT matched with Mediator's ID");
}
if(subOwnerID == m_mediatorID)
{
- OIC_LOG(INFO, ENROLEE_SECURITY_TAG,
+ OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG,
"The found device's owner ID is matched with Mediator's ID as a second owner");
ret = true;
break;
if(!ret)
{
- OIC_LOG(INFO, ENROLEE_SECURITY_TAG,
+ OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG,
"The found device's sub owner ID is NOT matched with Mediator's ID");
}
if( OC_STACK_OK == result->at(i).res )
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "MultipleOwnershipTransferCb is succeeded");
- OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Result is = %d for device %s", result->at(i).res, uuid.c_str());
+ OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Result is = %d", result->at(i).res);
+ OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "device uuid : %s", uuid.c_str());
+
OTMResult = true;
}
else
if( OC_STACK_OK == result->at(i).res )
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "OwnershipTransfer is succeeded");
- OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Result is = %d for device %s", result->at(i).res, uuid.c_str());
+ OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Result is = %d", result->at(i).res);
+ OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "device uuid : %s", uuid.c_str());
+
OTMResult = true;
}
else
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "Secured resource is found.");
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "HOST: %s", m_securedResource->getDevAddr().c_str());
- OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "SID: %s", m_securedResource->getDeviceID().c_str());
+ OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "SID: %s", m_securedResource->getDeviceID().c_str());
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Owned status: %d", m_securedResource->getOwnedStatus());
OicSecOxm_t selectedOTMethod = OIC_OXM_COUNT;
char uuidString[UUID_STRING_SIZE] = {};
if(OCConvertUuidToString(m_securedResource->getDevPtr()->doxm->owner.id, uuidString))
{
- OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Owner ID: %s", uuidString);
+ OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "Owner ID: %s", uuidString);
}
else
{
else if(OIC_PRECONFIG_PIN == ownershipTransferData.getMOTMethod())
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "Selected MOT Method: OIC_PRECONFIG_PIN");
- OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Pre-configured PIN: %s",
+ OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "Pre-configured PIN: %s",
ownershipTransferData.getPreConfiguredPin().c_str());
}
#endif
char uuidString[UUID_STRING_SIZE] = {};
if(OCConvertUuidToString(mediatorDevId->id, uuidString))
{
- OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Mediator UUID : %s", uuidString);
+ OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "Mediator UUID : %s", uuidString);
OICFree(mediatorDevId);
return std::string(uuidString);
}
OCStackResult result = OC_STACK_ERROR;
ESResult res = ESResult::ES_ERROR;
- OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Transfering ownership for : %s ",
+ OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "Transfering ownership for : %s ",
m_securedResource->getDeviceID().c_str());
OC::ResultCallBack ownershipTransferCb =
OCStackResult result = OC_STACK_ERROR;
- OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Transfering sub-ownership for : %s ",
+ OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "Transfering sub-ownership for : %s ",
m_securedResource->getDeviceID().c_str());
if(OIC_PRECONFIG_PIN == MOTdata.getMOTMethod() &&
std::string uuid;
convertUUIDToString(result->at(i).deviceId.id, uuid);
- OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG,
- "Result is = %d for device %s", result->at(i).res, uuid.c_str());
+ OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Result is = %d", result->at(i).res);
+ OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "device uuid : %s", uuid.c_str());
}
removeDeviceResult = true;
}
{
std::string uuid;
convertUUIDToString(pUuidList->dev.id, uuid);
- OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG,
+ OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG,
"m_ocResource->sid(): %s, cur DB UUID %s",
m_ocResource->sid().c_str(), uuid.c_str());
if(m_ocResource->sid() == uuid.c_str())
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "Secured resource is found.");
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "HOST: %s", ownedDevice->getDevAddr().c_str());
- OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "SID: %s", ownedDevice->getDeviceID().c_str());
+ OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "SID: %s", ownedDevice->getDeviceID().c_str());
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Owned status: %d", ownedDevice->getOwnedStatus());
if (ownedDevice->getOwnedStatus())
return res;
}
- OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Given cloudUuid: %s", cloudUuid.c_str());
+ OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "Given cloudUuid: %s", cloudUuid.c_str());
OicUuid_t uuid;
if(OC_STACK_OK != ConvertStrToUuid(cloudUuid.c_str(), &uuid))
OicSecAcl_t* acl = (OicSecAcl_t*) OICCalloc(1, sizeof(OicSecAcl_t));
if(!acl)
{
- OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
+ OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
return NULL; // not need to 'goto' |ERROR| before allocating |acl|
}
OicSecAce_t* ace = (OicSecAce_t*) OICCalloc(1, sizeof(OicSecAce_t));
if(!ace)
{
- OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
+ OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
return NULL; // not need to 'goto' |ERROR| before allocating |acl|
}
LL_APPEND(acl->aces, ace);
OicSecRsrc_t* rsrc = (OicSecRsrc_t*)OICCalloc(1, sizeof(OicSecRsrc_t));
if(!rsrc)
{
- OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
+ OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
OCDeleteACLList(acl);
return NULL;
}
rsrc->href = (char*) OICCalloc(len, sizeof(char));
if(!rsrc->href)
{
- OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
+ OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
FreeRsrc(rsrc);
OCDeleteACLList(acl);
return NULL;
rsrc->types = (char**)OICCalloc(arrLen, sizeof(char*));
if(!rsrc->types)
{
- OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
+ OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
FreeRsrc(rsrc);
OCDeleteACLList(acl);
return NULL;
rsrc->types[0] = OICStrdup("rt"); // ignore
if(!rsrc->types[0])
{
- OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "createAcl: OICStrdup error return");
+ OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "createAcl: OICStrdup error return");
FreeRsrc(rsrc);
OCDeleteACLList(acl);
return NULL;
rsrc->interfaces = (char**)OICCalloc(arrLen, sizeof(char*));
if(!rsrc->interfaces)
{
- OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
+ OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
FreeRsrc(rsrc);
OCDeleteACLList(acl);
return NULL;
rsrc->interfaces[0] = OICStrdup("if"); // ignore
if(!rsrc->interfaces[0])
{
- OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "createAcl: OICStrdup error return");
+ OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "createAcl: OICStrdup error return");
FreeRsrc(rsrc);
OCDeleteACLList(acl);
return NULL;
for (unsigned int i = 0; i < result->size(); i++)
{
convertUUIDToString(result->at(i).deviceId.id, devUuid);
- OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Result is = %d for device %s",
- result->at(i).res, devUuid.c_str());
+
+ OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Result is = %d", result->at(i).res);
+ OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "device uuid : %s", devUuid.c_str());
}
delete result;
aclResult = true;
for (unsigned int i = 0; i < result->size(); i++)
{
convertUUIDToString(result->at(i).deviceId.id, devUuid);
- OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Result is = %d for device %s",
- result->at(i).res, devUuid.c_str());
+
+ OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Result is = %d", result->at(i).res);
+ OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "device uuid : %s", devUuid.c_str());
}
delete result;
certResult= true;
const std::shared_ptr< SecProvisioningStatus > status,
std::weak_ptr<RemoteEnrollee> this_ptr)
{
- OIC_LOG_V(DEBUG,ES_REMOTE_ENROLLEE_TAG,"onSecurityStatusHandlerCallback");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG,"onSecurityStatusHandlerCallback");
std::shared_ptr<RemoteEnrollee> Ptr = this_ptr.lock();
if(Ptr)
{
void RemoteEnrollee::securityStatusHandler(
const std::shared_ptr< SecProvisioningStatus > status) const
{
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "securityStatusHandlr IN");
- OIC_LOG_V(DEBUG, ES_REMOTE_ENROLLEE_TAG, "UUID = %s, ESResult = %d",
- status->getDeviceUUID().c_str(), status->getESResult());
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "securityStatusHandlr IN");
+ OIC_LOG_V(INFO_PRIVATE, ES_REMOTE_ENROLLEE_TAG, "UUID = %s", status->getDeviceUUID().c_str());
+ OIC_LOG_V(INFO, ES_REMOTE_ENROLLEE_TAG, "ESResult = %d", status->getESResult());
if(status->getESResult() == ES_OK)
{
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "Ownership transfer is successfully done.");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "Ownership transfer is successfully done.");
m_securityProvStatusCb(status);
}
else
OIC_LOG(ERROR, ES_REMOTE_ENROLLEE_TAG, "Ownership transfer is failed.");
m_securityProvStatusCb(status);
}
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "securityStatusHandlr OUT");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "securityStatusHandlr OUT");
}
ESOwnershipTransferData RemoteEnrollee::onSecurityStatusWithOptionHandlerCallback(
const std::shared_ptr< SecProvisioningStatus > status,
std::weak_ptr<RemoteEnrollee> this_ptr)
{
- OIC_LOG_V(DEBUG,ES_REMOTE_ENROLLEE_TAG,"onSecurityStatusWithOptionHandlerCallback");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG,"onSecurityStatusWithOptionHandlerCallback");
std::shared_ptr<RemoteEnrollee> Ptr = this_ptr.lock();
if(Ptr)
{
ESOwnershipTransferData RemoteEnrollee::securityStatusWithOptionHandler(
const std::shared_ptr< SecProvisioningStatus > status) const
{
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "securityStatusWithOptionHandler IN");
- OIC_LOG_V(DEBUG, ES_REMOTE_ENROLLEE_TAG, "UUID = %s, ESResult = %d",
- status->getDeviceUUID().c_str(), status->getESResult());
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "securityStatusWithOptionHandler IN");
+ OIC_LOG_V(INFO_PRIVATE, ES_REMOTE_ENROLLEE_TAG, "UUID = %s", status->getDeviceUUID().c_str());
+ OIC_LOG_V(INFO, ES_REMOTE_ENROLLEE_TAG, "ESResult = %d", status->getESResult());
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "securityStatusWithOptionHandler OUT");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "securityStatusWithOptionHandler OUT");
return m_securityProvStatusCbWithOption(status);
}
const std::shared_ptr< GetEnrolleeStatus > status,
std::weak_ptr<RemoteEnrollee> this_ptr)
{
- OIC_LOG_V(DEBUG,ES_REMOTE_ENROLLEE_TAG,"onGetStatusHandlerCallback");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG,"onGetStatusHandlerCallback");
std::shared_ptr<RemoteEnrollee> Ptr = this_ptr.lock();
if(Ptr)
{
void RemoteEnrollee::getStatusHandler(
const std::shared_ptr< GetEnrolleeStatus > status) const
{
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "getStatusHandler IN");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "getStatusHandler IN");
- OIC_LOG_V(DEBUG, ES_REMOTE_ENROLLEE_TAG, "getStatusHandler = %d",
+ OIC_LOG_V(INFO, ES_REMOTE_ENROLLEE_TAG, "getStatusHandler = %d",
status->getESResult());
m_getStatusCb(status);
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "getStatusHandler OUT");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "getStatusHandler OUT");
}
void RemoteEnrollee::onGetConfigurationStatusHandlerCallback(
const std::shared_ptr< GetConfigurationStatus > status,
std::weak_ptr<RemoteEnrollee> this_ptr)
{
- OIC_LOG_V(DEBUG,ES_REMOTE_ENROLLEE_TAG,"onGetConfigurationStatusHandlerCallback");
+ OIC_LOG(INFO,ES_REMOTE_ENROLLEE_TAG,"onGetConfigurationStatusHandlerCallback");
std::shared_ptr<RemoteEnrollee> Ptr = this_ptr.lock();
if(Ptr)
{
void RemoteEnrollee::getConfigurationStatusHandler (
const std::shared_ptr< GetConfigurationStatus > status) const
{
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "getConfigurationStatusHandler IN");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "getConfigurationStatusHandler IN");
- OIC_LOG_V(DEBUG, ES_REMOTE_ENROLLEE_TAG,"GetConfigurationStatus = %d",
+ OIC_LOG_V(INFO, ES_REMOTE_ENROLLEE_TAG,"GetConfigurationStatus = %d",
status->getESResult());
m_getConfigurationStatusCb(status);
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "getConfigurationStatusHandler OUT");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "getConfigurationStatusHandler OUT");
}
void RemoteEnrollee::onDevicePropProvisioningStatusHandlerCallback(
const std::shared_ptr< DevicePropProvisioningStatus > status,
std::weak_ptr<RemoteEnrollee> this_ptr)
{
- OIC_LOG_V(DEBUG,ES_REMOTE_ENROLLEE_TAG,"onDevicePropProvisioningStatusHandlerCallback");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG,"onDevicePropProvisioningStatusHandlerCallback");
std::shared_ptr<RemoteEnrollee> Ptr = this_ptr.lock();
if(Ptr)
{
void RemoteEnrollee::devicePropProvisioningStatusHandler(
const std::shared_ptr< DevicePropProvisioningStatus > status) const
{
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "devicePropProvisioningStatusHandler IN");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "devicePropProvisioningStatusHandler IN");
- OIC_LOG_V(DEBUG, ES_REMOTE_ENROLLEE_TAG, "DeviceProvStatus = %d", status->getESResult());
+ OIC_LOG_V(INFO, ES_REMOTE_ENROLLEE_TAG, "DeviceProvStatus = %d", status->getESResult());
m_devicePropProvStatusCb(status);
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "devicePropProvisioningStatusHandler OUT");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "devicePropProvisioningStatusHandler OUT");
}
void RemoteEnrollee::onCloudPropProvisioningStatusHandlerCallback(
const std::shared_ptr< CloudPropProvisioningStatus > status,
std::weak_ptr<RemoteEnrollee> this_ptr)
{
- OIC_LOG_V(DEBUG,ES_REMOTE_ENROLLEE_TAG,"onCloudPropProvisioningStatusHandlerCallback");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG,"onCloudPropProvisioningStatusHandlerCallback");
std::shared_ptr<RemoteEnrollee> Ptr = this_ptr.lock();
if(Ptr)
{
void RemoteEnrollee::cloudPropProvisioningStatusHandler (
const std::shared_ptr< CloudPropProvisioningStatus > status) const
{
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "cloudPropProvisioningStatusHandler IN");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "cloudPropProvisioningStatusHandler IN");
- OIC_LOG_V(DEBUG,ES_REMOTE_ENROLLEE_TAG,"CloudProvStatus = %d",
+ OIC_LOG_V(INFO,ES_REMOTE_ENROLLEE_TAG,"CloudProvStatus = %d",
status->getESResult());
m_cloudPropProvStatusCb(status);
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "cloudPropProvisioningStatusHandler OUT");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "cloudPropProvisioningStatusHandler OUT");
}
void RemoteEnrollee::onDiscoveredCallback(const std::shared_ptr<OC::OCResource> resource,
std::weak_ptr<RemoteEnrollee> this_ptr)
{
- OIC_LOG_V(DEBUG,ES_REMOTE_ENROLLEE_TAG,"onDiscoveredCallback()");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG,"onDiscoveredCallback()");
std::shared_ptr<RemoteEnrollee> Ptr = this_ptr.lock();
if(Ptr)
{
void RemoteEnrollee::onDeviceDiscovered(std::shared_ptr<OC::OCResource> resource)
{
- OIC_LOG (DEBUG, ES_REMOTE_ENROLLEE_TAG, "onDeviceDiscovered IN");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "onDeviceDiscovered IN");
try
{
// Get the resource URI
resourceURI = resource->uri();
- OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_TAG,
+ OIC_LOG_V(INFO_PRIVATE, ES_REMOTE_ENROLLEE_TAG,
"URI of the resource: %s", resourceURI.c_str());
// Get the resource host address
hostAddress = resource->host();
- OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_TAG,
+ OIC_LOG_V(INFO_PRIVATE, ES_REMOTE_ENROLLEE_TAG,
"Host address of the resource: %s", hostAddress.c_str());
hostDeviceID = resource->sid();
- OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_TAG,
+ OIC_LOG_V(INFO_PRIVATE, ES_REMOTE_ENROLLEE_TAG,
"Host DeviceID of the resource: %s", hostDeviceID.c_str());
if(!m_deviceId.empty() && m_deviceId == hostDeviceID)
{
- OIC_LOG (DEBUG, ES_REMOTE_ENROLLEE_TAG, "Find matched resource for cloud provisioning");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "Find matched resource for cloud provisioning");
m_ocResource = resource;
m_discoveryResponse = true;
m_cond.notify_all();
}
catch(std::exception& e)
{
- OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_TAG,
+ OIC_LOG_V(INFO, ES_REMOTE_ENROLLEE_TAG,
"Exception in foundResource: %s", e.what());
}
- OIC_LOG (DEBUG, ES_REMOTE_ENROLLEE_TAG, "onDeviceDiscovered OUT");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "onDeviceDiscovered OUT");
}
ESResult RemoteEnrollee::discoverResource()
{
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "discoverResource IN");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "discoverResource IN");
std::string query("");
query.append(ES_BASE_RES_URI);
query.append("?rt=");
query.append(OC_RSRVD_ES_RES_TYPE_EASYSETUP);
- OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_TAG, "query = %s", query.c_str());
+ OIC_LOG_V(INFO, ES_REMOTE_ENROLLEE_TAG, "query = %s", query.c_str());
m_discoveryResponse = false;
if (result != OCStackResult::OC_STACK_OK)
{
- OIC_LOG(ERROR,ES_REMOTE_ENROLLEE_TAG,
+ OIC_LOG(ERROR, ES_REMOTE_ENROLLEE_TAG,
"Failed discoverResource");
return ES_ERROR;
}
if (!m_discoveryResponse)
{
- OIC_LOG(ERROR,ES_REMOTE_ENROLLEE_TAG,
+ OIC_LOG(ERROR, ES_REMOTE_ENROLLEE_TAG,
"Failed discoverResource because timeout");
return ES_ERROR;
}
void RemoteEnrollee::provisionSecurity(const SecurityProvStatusCb callback)
{
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "provisionSecurity IN");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "provisionSecurity IN");
#ifdef __WITH_DTLS__
ESResult res = ESResult::ES_ERROR;
if(!callback)
std::make_shared< SecProvisioningStatus >(m_localEnrolleeSecurity->getUUID(), res);
securityProvStatusCb(securityProvisioningStatus);
#else
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG,"Mediator is unsecured built.");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG,"Mediator is unsecured built.");
if(!callback)
{
("", ESResult::ES_SEC_OPERATION_IS_NOT_SUPPORTED);
callback(securityProvisioningStatus);
#endif
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "provisionSecurity OUT");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "provisionSecurity OUT");
}
void RemoteEnrollee::provisionSecurity(const SecurityProvStatusCbWithOption callback)
{
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "provisionSecurity IN");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "provisionSecurity IN");
#ifdef __WITH_DTLS__
ESResult res = ESResult::ES_ERROR;
if(!callback)
std::make_shared< SecProvisioningStatus >(m_localEnrolleeSecurity->getUUID(), res);
securityProvStatusCbWithOption(securityProvisioningStatus);
#else
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG,"Mediator is unsecured built.");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG,"Mediator is unsecured built.");
if(!callback)
{
("", ESResult::ES_SEC_OPERATION_IS_NOT_SUPPORTED);
callback(securityProvisioningStatus);
#endif
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "provisionSecurity OUT");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "provisionSecurity OUT");
}
void RemoteEnrollee::getStatus(const GetStatusCb callback)
{
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "getStatus IN");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "getStatus IN");
if(!callback)
{
m_enrolleeResource->registerGetStatusCallback(getStatusCb);
m_enrolleeResource->getStatus();
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "getStatus OUT");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "getStatus OUT");
}
void RemoteEnrollee::getConfiguration(const GetConfigurationStatusCb callback)
{
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "getConfiguration IN");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "getConfiguration IN");
if(!callback)
{
m_enrolleeResource->registerGetConfigurationStatusCallback(getConfigurationStatusCb);
m_enrolleeResource->getConfiguration();
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "getConfiguration OUT");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "getConfiguration OUT");
}
void RemoteEnrollee::provisionDeviceProperties(const DeviceProp& deviceProp,
const DevicePropProvStatusCb callback)
{
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "provisionDeviceProperties IN");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "provisionDeviceProperties IN");
if(!callback)
{
m_enrolleeResource->registerDevicePropProvStatusCallback(devicePropProvStatusCb);
m_enrolleeResource->provisionProperties(deviceProp);
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "provisionDeviceProperties OUT");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "provisionDeviceProperties OUT");
}
void RemoteEnrollee::initCloudResource()
{
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "initCloudResource IN");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "initCloudResource IN");
ESResult result = ES_ERROR;
if (result == ES_ERROR)
{
- OIC_LOG(ERROR,ES_REMOTE_ENROLLEE_TAG,
+ OIC_LOG(ERROR, ES_REMOTE_ENROLLEE_TAG,
"Failed to create resource object using discoverResource");
throw ESBadRequestException ("Resource object not created");
}
}
}
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "initCloudResource OUT");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "initCloudResource OUT");
}
void RemoteEnrollee::provisionCloudProperties(const CloudProp& cloudProp,
const CloudPropProvStatusCb callback)
{
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "provisionCloudProperties w/o OCResource IN");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "provisionCloudProperties w/o OCResource IN");
provisionCloudProperties(NULL, cloudProp, callback);
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "provisionCloudProperties w/o OCResource OUT");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "provisionCloudProperties w/o OCResource OUT");
}
void RemoteEnrollee::provisionCloudProperties(const std::shared_ptr< OC::OCResource > resource,
const CloudProp& cloudProp,
const CloudPropProvStatusCb callback)
{
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "provisionCloudProperties IN");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "provisionCloudProperties IN");
if(!callback)
{
if(resource->getResourceTypes().at(0) != OC_RSRVD_ES_RES_TYPE_EASYSETUP ||
resource->connectivityType() & CT_ADAPTER_TCP)
{
- OIC_LOG (ERROR, ES_REMOTE_ENROLLEE_TAG, "Given resource is not valid due to wrong rt or conntype");
+ OIC_LOG(ERROR, ES_REMOTE_ENROLLEE_TAG, "Given resource is not valid due to wrong rt or conntype");
throw ESInvalidParameterException("A given OCResource is wrong");
}
{
if(interface.compare(BATCH_INTERFACE) == 0)
{
- OIC_LOG (DEBUG, ES_REMOTE_ENROLLEE_TAG, "RemoteEnrollee object is succeessfully created");
- OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_TAG, "HOST: %s", resource->host().c_str());
- OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_TAG, "URI: %s", resource->uri().c_str());
- OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_TAG, "SID: %s", resource->sid().c_str());
- OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_TAG, "CONNECTIVITY: %d", resource->connectivityType());
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "RemoteEnrollee object is succeessfully created");
+ OIC_LOG_V(INFO_PRIVATE, ES_REMOTE_ENROLLEE_TAG, "HOST: %s", resource->host().c_str());
+ OIC_LOG_V(INFO_PRIVATE, ES_REMOTE_ENROLLEE_TAG, "URI: %s", resource->uri().c_str());
+ OIC_LOG_V(INFO_PRIVATE, ES_REMOTE_ENROLLEE_TAG, "SID: %s", resource->sid().c_str());
+ OIC_LOG_V(INFO_PRIVATE, ES_REMOTE_ENROLLEE_TAG, "CONNECTIVITY: %d", resource->connectivityType());
isFound = true;
}
}
}
else
{
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "Skip to find a provisioning resource");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "Skip to find a provisioning resource");
m_ocResource = resource;
m_cloudResource = std::make_shared<CloudResource>(m_ocResource);
}
}
else
{
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "ACL and Cert. provisioning are skipped.");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "ACL and Cert. provisioning are skipped.");
}
#endif //defined(__WITH_DTLS__) && defined(__WITH_TLS__)
m_cloudResource->registerCloudPropProvisioningStatusCallback(cloudPropProvStatusCb);
m_cloudResource->provisionProperties(cloudProp);
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "provisionCloudProperties OUT");
+ OIC_LOG(INFO, ES_REMOTE_ENROLLEE_TAG, "provisionCloudProperties OUT");
}
}
}