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; ...@@ -46,11 +46,11 @@ static ESDeviceProperty gESDeviceProperty;
void ESWiFiConfRsrcCallback(ESResult esResult, ESWiFiConfData *eventData) 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) if(esResult != ES_OK)
{ {
OIC_LOG_V(ERROR, ES_ENROLLEE_TAG, "ESWiFiConfRsrcCallback Error Occured"); OIC_LOG(ERROR, ES_ENROLLEE_TAG, "ESWiFiConfRsrcCallback Error Occured");
return; return;
} }
...@@ -61,18 +61,18 @@ void ESWiFiConfRsrcCallback(ESResult esResult, ESWiFiConfData *eventData) ...@@ -61,18 +61,18 @@ void ESWiFiConfRsrcCallback(ESResult esResult, ESWiFiConfData *eventData)
} }
else else
{ {
OIC_LOG_V(ERROR, ES_ENROLLEE_TAG, "WiFiConfProvCb is NULL"); OIC_LOG(ERROR, ES_ENROLLEE_TAG, "WiFiConfProvCb is NULL");
return; return;
} }
} }
void ESCoapCloudConfRsrcCallback(ESResult esResult, ESCoapCloudConfData *eventData) 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) if(esResult != ES_OK)
{ {
OIC_LOG_V(ERROR, ES_ENROLLEE_TAG, "ESCoapCloudConfRsrcCallback Error Occured"); OIC_LOG(ERROR, ES_ENROLLEE_TAG, "ESCoapCloudConfRsrcCallback Error Occured");
return; return;
} }
...@@ -82,18 +82,18 @@ void ESCoapCloudConfRsrcCallback(ESResult esResult, ESCoapCloudConfData *eventDa ...@@ -82,18 +82,18 @@ void ESCoapCloudConfRsrcCallback(ESResult esResult, ESCoapCloudConfData *eventDa
} }
else else
{ {
OIC_LOG_V(ERROR, ES_ENROLLEE_TAG, "CoapCloudConfProvCb is NULL"); OIC_LOG(ERROR, ES_ENROLLEE_TAG, "CoapCloudConfProvCb is NULL");
return; return;
} }
} }
void ESDevConfRsrcallback(ESResult esResult, ESDevConfData *eventData) 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) if(esResult != ES_OK)
{ {
OIC_LOG_V(ERROR, ES_ENROLLEE_TAG, "ESDevConfRsrcallback Error Occured"); OIC_LOG(ERROR, ES_ENROLLEE_TAG, "ESDevConfRsrcallback Error Occured");
return; return;
} }
...@@ -103,7 +103,7 @@ void ESDevConfRsrcallback(ESResult esResult, ESDevConfData *eventData) ...@@ -103,7 +103,7 @@ void ESDevConfRsrcallback(ESResult esResult, ESDevConfData *eventData)
} }
else else
{ {
OIC_LOG_V(ERROR, ES_ENROLLEE_TAG, "DevConfProvCb is NULL"); OIC_LOG(ERROR, ES_ENROLLEE_TAG, "DevConfProvCb is NULL");
return; return;
} }
} }
...@@ -185,14 +185,14 @@ ESResult ESSetDeviceProperty(ESDeviceProperty *deviceProperty) ...@@ -185,14 +185,14 @@ ESResult ESSetDeviceProperty(ESDeviceProperty *deviceProperty)
while((deviceProperty->WiFi).mode[modeIdx] != WiFi_EOF) while((deviceProperty->WiFi).mode[modeIdx] != WiFi_EOF)
{ {
(gESDeviceProperty.WiFi).mode[modeIdx] = (deviceProperty->WiFi).mode[modeIdx]; (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 ++; modeIdx ++;
} }
(gESDeviceProperty.WiFi).freq = (deviceProperty->WiFi).freq; (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); 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"); OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESSetDeviceProperty OUT");
return ES_OK; return ES_OK;
...@@ -235,7 +235,7 @@ ESResult ESSetErrorCode(ESErrorCode esErrCode) ...@@ -235,7 +235,7 @@ ESResult ESSetErrorCode(ESErrorCode esErrCode)
return ES_ERROR; 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"); OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESSetErrorCode OUT");
return ES_OK; return ES_OK;
} }
...@@ -259,6 +259,8 @@ ESResult ESTerminateEnrollee() ...@@ -259,6 +259,8 @@ ESResult ESTerminateEnrollee()
ESResult ESSetCallbackForUserdata(ESReadUserdataCb readCb, ESWriteUserdataCb writeCb) ESResult ESSetCallbackForUserdata(ESReadUserdataCb readCb, ESWriteUserdataCb writeCb)
{ {
OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESSetCallbackForUserdata IN");
if(!readCb && !writeCb) if(!readCb && !writeCb)
{ {
OIC_LOG(INFO, ES_ENROLLEE_TAG, "Both of callbacks for user data are null"); OIC_LOG(INFO, ES_ENROLLEE_TAG, "Both of callbacks for user data are null");
......
...@@ -46,7 +46,7 @@ namespace OIC ...@@ -46,7 +46,7 @@ namespace OIC
ESCloudResourceCb cb, ESCloudResourceCb cb,
std::weak_ptr<CloudResource> this_ptr) 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(); std::shared_ptr<CloudResource> Ptr = this_ptr.lock();
if(Ptr) if(Ptr)
{ {
...@@ -57,7 +57,7 @@ namespace OIC ...@@ -57,7 +57,7 @@ namespace OIC
void CloudResource::provisionProperties(const CloudProp& cloudProp) 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(); OCRepresentation provisioningRepresentation = cloudProp.toOCRepresentation();
...@@ -71,13 +71,13 @@ namespace OIC ...@@ -71,13 +71,13 @@ namespace OIC
m_ocResource->post(OC_RSRVD_ES_RES_TYPE_EASYSETUP, BATCH_INTERFACE, m_ocResource->post(OC_RSRVD_ES_RES_TYPE_EASYSETUP, BATCH_INTERFACE,
provisioningRepresentation, QueryParamsMap(), cb, OC::QualityOfService::HighQos); 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*/, void CloudResource::onCloudProvResponse(const HeaderOptions& /*headerOptions*/,
const OCRepresentation& /*rep*/, const int eCode) 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); eCode);
if (eCode > OCStackResult::OC_STACK_RESOURCE_CHANGED) if (eCode > OCStackResult::OC_STACK_RESOURCE_CHANGED)
...@@ -88,7 +88,7 @@ namespace OIC ...@@ -88,7 +88,7 @@ namespace OIC
if(eCode == OCStackResult::OC_STACK_COMM_ERROR) 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."); "can't receive any response from Enrollee by a timeout threshold.");
result = ESResult::ES_COMMUNICATION_ERROR; result = ESResult::ES_COMMUNICATION_ERROR;
} }
......
...@@ -50,7 +50,7 @@ namespace OIC ...@@ -50,7 +50,7 @@ namespace OIC
std::shared_ptr<RemoteEnrollee> EasySetup::createRemoteEnrollee (std::shared_ptr< OC::OCResource > resource) 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(resource)
{ {
...@@ -66,11 +66,11 @@ namespace OIC ...@@ -66,11 +66,11 @@ namespace OIC
{ {
if(interface.compare(BATCH_INTERFACE) == 0) if(interface.compare(BATCH_INTERFACE) == 0)
{ {
OIC_LOG (DEBUG, EASYSETUP_TAG, "RemoteEnrollee object is succeessfully created"); OIC_LOG (INFO, EASYSETUP_TAG, "RemoteEnrollee object is succeessfully created");
OIC_LOG_V (DEBUG, EASYSETUP_TAG, "HOST: %s", resource->host().c_str()); OIC_LOG_V (INFO_PRIVATE, EASYSETUP_TAG, "HOST: %s", resource->host().c_str());
OIC_LOG_V (DEBUG, EASYSETUP_TAG, "URI: %s", resource->uri().c_str()); OIC_LOG_V (INFO_PRIVATE, EASYSETUP_TAG, "URI: %s", resource->uri().c_str());
OIC_LOG_V (DEBUG, EASYSETUP_TAG, "SID: %s", resource->sid().c_str()); OIC_LOG_V (INFO_PRIVATE, EASYSETUP_TAG, "SID: %s", resource->sid().c_str());
OIC_LOG_V (DEBUG, EASYSETUP_TAG, "CONNECTIVITY: %d", resource->connectivityType()); OIC_LOG_V (INFO_PRIVATE, EASYSETUP_TAG, "CONNECTIVITY: %d", resource->connectivityType());
return std::shared_ptr< RemoteEnrollee > (new RemoteEnrollee(resource)); return std::shared_ptr< RemoteEnrollee > (new RemoteEnrollee(resource));
} }
} }
......
...@@ -44,7 +44,7 @@ namespace OIC ...@@ -44,7 +44,7 @@ namespace OIC
ESEnrolleeResourceCb cb, ESEnrolleeResourceCb cb,
std::weak_ptr<EnrolleeResource> this_ptr) 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(); std::shared_ptr<EnrolleeResource> Ptr = this_ptr.lock();
if(Ptr) if(Ptr)
{ {
...@@ -55,19 +55,19 @@ namespace OIC ...@@ -55,19 +55,19 @@ namespace OIC
void EnrolleeResource::onProvisioningResponse(const HeaderOptions& /*headerOptions*/, void EnrolleeResource::onProvisioningResponse(const HeaderOptions& /*headerOptions*/,
const OCRepresentation& /*rep*/, const int eCode) 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); eCode);
if (eCode > OCStackResult::OC_STACK_RESOURCE_CHANGED) if (eCode > OCStackResult::OC_STACK_RESOURCE_CHANGED)
{ {
ESResult result = ESResult::ES_ERROR; 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 "); "onProvisioningResponse : Provisioning is failed ");
if(eCode == OCStackResult::OC_STACK_COMM_ERROR) 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."); "can't receive any response from Enrollee by a timeout threshold.");
result = ESResult::ES_COMMUNICATION_ERROR; result = ESResult::ES_COMMUNICATION_ERROR;
} }
...@@ -78,7 +78,7 @@ namespace OIC ...@@ -78,7 +78,7 @@ namespace OIC
return; return;
} }
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
"onProvisioningResponse : Provisioning is success. "); "onProvisioningResponse : Provisioning is success. ");
std::shared_ptr< DevicePropProvisioningStatus > provStatus = std::make_shared< std::shared_ptr< DevicePropProvisioningStatus > provStatus = std::make_shared<
...@@ -89,19 +89,19 @@ namespace OIC ...@@ -89,19 +89,19 @@ namespace OIC
void EnrolleeResource::onGetStatusResponse(const HeaderOptions& /*headerOptions*/, void EnrolleeResource::onGetStatusResponse(const HeaderOptions& /*headerOptions*/,
const OCRepresentation& rep, const int eCode) 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); eCode);
if (eCode > OCStackResult::OC_STACK_RESOURCE_CHANGED) if (eCode > OCStackResult::OC_STACK_RESOURCE_CHANGED)
{ {
ESResult result = ESResult::ES_ERROR; 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 "); "onGetStatusResponse : onGetStatusResponse is failed ");
if(eCode == OCStackResult::OC_STACK_COMM_ERROR) 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."); "can't receive any response from Enrollee by a timeout threshold.");
result = ESResult::ES_COMMUNICATION_ERROR; result = ESResult::ES_COMMUNICATION_ERROR;
} }
...@@ -125,19 +125,19 @@ namespace OIC ...@@ -125,19 +125,19 @@ namespace OIC
void EnrolleeResource::onGetConfigurationResponse(const HeaderOptions& /*headerOptions*/, void EnrolleeResource::onGetConfigurationResponse(const HeaderOptions& /*headerOptions*/,
const OCRepresentation& rep, const int eCode) 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); eCode);
if (eCode > OCStackResult::OC_STACK_RESOURCE_CHANGED) if (eCode > OCStackResult::OC_STACK_RESOURCE_CHANGED)
{ {
ESResult result = ESResult::ES_ERROR; 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 "); "onGetConfigurationResponse : onGetConfigurationResponse is failed ");
if(eCode == OCStackResult::OC_STACK_COMM_ERROR) 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."); "can't receive any response from Enrollee by a timeout threshold.");
result = ESResult::ES_COMMUNICATION_ERROR; result = ESResult::ES_COMMUNICATION_ERROR;
} }
...@@ -177,7 +177,7 @@ namespace OIC ...@@ -177,7 +177,7 @@ namespace OIC
void EnrolleeResource::getStatus() 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) if (m_ocResource == nullptr)
{ {
...@@ -212,12 +212,12 @@ namespace OIC ...@@ -212,12 +212,12 @@ namespace OIC
return; return;
} }
OIC_LOG (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "getStatus OUT"); OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "getStatus OUT");
} }
void EnrolleeResource::getConfiguration() 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) if (m_ocResource == nullptr)
{ {
...@@ -251,12 +251,12 @@ namespace OIC ...@@ -251,12 +251,12 @@ namespace OIC
return; 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) 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) if (m_ocResource == nullptr)
{ {
throw ESBadRequestException("Resource is not initialized"); throw ESBadRequestException("Resource is not initialized");
...@@ -275,7 +275,7 @@ namespace OIC ...@@ -275,7 +275,7 @@ namespace OIC
m_ocResource->post(OC_RSRVD_ES_RES_TYPE_EASYSETUP, BATCH_INTERFACE, m_ocResource->post(OC_RSRVD_ES_RES_TYPE_EASYSETUP, BATCH_INTERFACE,
provisioningRepresentation, QueryParamsMap(), cb, OC::QualityOfService::HighQos); 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");
} }
} }
} }
...@@ -71,7 +71,7 @@ namespace OIC ...@@ -71,7 +71,7 @@ namespace OIC
ESSecurityCb cb, ESSecurityCb cb,
std::weak_ptr<EnrolleeSecurity> this_ptr) 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(); std::shared_ptr<EnrolleeSecurity> Ptr = this_ptr.lock();
if(Ptr) if(Ptr)
{ {
...@@ -185,18 +185,18 @@ namespace OIC ...@@ -185,18 +185,18 @@ namespace OIC
ownerID = {}; ownerID = {};
} }
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Mediator ID %s", m_mediatorID.c_str()); OIC_LOG_V(INFO_PRIVATE, 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, "Enrollee's Owner ID %s", ownerID.c_str());
if(ownerID == m_mediatorID) 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"); "The found device's first owner ID is matched with Mediator's ID");
ret = true; ret = true;
} }
else 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"); "The found device's first owner ID is NOT matched with Mediator's ID");
} }
...@@ -237,7 +237,7 @@ namespace OIC ...@@ -237,7 +237,7 @@ namespace OIC
if(subOwnerID == m_mediatorID) 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"); "The found device's owner ID is matched with Mediator's ID as a second owner");
ret = true; ret = true;
break; break;
...@@ -247,7 +247,7 @@ namespace OIC ...@@ -247,7 +247,7 @@ namespace OIC
if(!ret) 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"); "The found device's sub owner ID is NOT matched with Mediator's ID");
} }
...@@ -337,7 +337,9 @@ namespace OIC ...@@ -337,7 +337,9 @@ namespace OIC
if( OC_STACK_OK == result->at(i).res ) if( OC_STACK_OK == result->at(i).res )
{ {
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "MultipleOwnershipTransferCb is succeeded"); 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; OTMResult = true;
} }
else else
...@@ -556,7 +558,9 @@ namespace OIC ...@@ -556,7 +558,9 @@ namespace OIC
if( OC_STACK_OK == result->at(i).res ) if( OC_STACK_OK == result->at(i).res )
{ {
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "OwnershipTransfer is succeeded"); 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; OTMResult = true;
} }
else else
...@@ -622,7 +626,7 @@ namespace OIC ...@@ -622,7 +626,7 @@ namespace OIC
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "Secured resource is found."); 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, "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()); OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Owned status: %d", m_securedResource->getOwnedStatus());
OicSecOxm_t selectedOTMethod = OIC_OXM_COUNT; OicSecOxm_t selectedOTMethod = OIC_OXM_COUNT;
...@@ -640,7 +644,7 @@ namespace OIC ...@@ -640,7 +644,7 @@ namespace OIC
char uuidString[UUID_STRING_SIZE] = {}; char uuidString[UUID_STRING_SIZE] = {};
if(OCConvertUuidToString(m_securedResource->getDevPtr()->doxm->owner.id, uuidString)) 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
{ {
...@@ -670,7 +674,7 @@ namespace OIC ...@@ -670,7 +674,7 @@ namespace OIC
else if(OIC_PRECONFIG_PIN == ownershipTransferData.getMOTMethod()) else if(OIC_PRECONFIG_PIN == ownershipTransferData.getMOTMethod())
{ {
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "Selected MOT Method: OIC_PRECONFIG_PIN"); 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()); ownershipTransferData.getPreConfiguredPin().c_str());
} }
#endif #endif
...@@ -733,7 +737,7 @@ namespace OIC ...@@ -733,7 +737,7 @@ namespace OIC
char uuidString[UUID_STRING_SIZE] = {}; char uuidString[UUID_STRING_SIZE] = {};
if(OCConvertUuidToString(mediatorDevId->id, uuidString)) 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); OICFree(mediatorDevId);
return std::string(uuidString); return std::string(uuidString</