wrt-plugins-tizen_0.4.23
[framework/web/wrt-plugins-tizen.git] / src / Common / JSWebAPIError.cpp
index 46c5507..9f2cb98 100644 (file)
 //
 
 #include "JSWebAPIError.h"
-
-#include <dpl/log/log.h>
-
 #include <CommonsJavaScript/Converter.h>
 #include <CommonsJavaScript/JSUtils.h>
 #include <string>
+#include "Logger.h"
 
 namespace DeviceAPI {
 namespace Common {
@@ -188,14 +186,14 @@ namespace{
                JSValueRef JSWebAPIError::getStaticProperty(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* /*exception*/) {
                        PrivateObject* privateObject = static_cast<PrivateObject*> (JSObjectGetPrivate(object));
                        if (!privateObject) {
-                               LogError("Private object is not set.");
+                               LoggerE("Private object is not set.");
                                return JSValueMakeUndefined(context);
                        }
 
                        WrtDeviceApis::CommonsJavaScript::Converter converter(context);
                        try {
                                if (JSStringIsEqualToUTF8CString(propertyName, PROPERTY_CODE)) {
-                                       LogDebug("propertyName PROPERTY_CODE");
+                                       LoggerD("propertyName PROPERTY_CODE");
                                        return converter.toJSValueRef(privateObject->getObject()->getCode());
                                } else if (JSStringIsEqualToUTF8CString(propertyName, PROPERTY_NAME)) {
                                        return converter.toJSValueRef(privateObject->getObject()->getName());
@@ -256,11 +254,11 @@ namespace{
                                }else if (JSStringIsEqualToUTF8CString(propertyName, PROPERTY_DATA_CLONE_ERR)) {
                                        return converter.toJSValueRef(DATA_CLONE_ERR);
                                }else{
-                                       LogDebug("propertyName not supported");
+                                       LoggerD("propertyName not supported");
                                        return converter.toJSValueRef(UNKNOWN_ERR);
                                }
                        } catch (const WrtDeviceApis::Commons::ConversionException& ex) {
-                               LogError("Exception: " << ex.GetMessage());
+                               LoggerE("Exception: " << ex.GetMessage());
                        }
 
                        return JSValueMakeUndefined(context);
@@ -284,7 +282,7 @@ namespace{
                }
 
                int JSWebAPIError::convertToWebAPIErrorCode(const std::string& errorName){
-                       LogDebug("<<< errorName:[" << errorName << "]");
+                       LoggerD("<<< errorName:[" << errorName << "]");
 
                        int retErrorCode = -1;
 
@@ -312,7 +310,7 @@ namespace{
                                retErrorCode = UNKNOWN_ERR;
                        }
 
-                       LogDebug(">>> retERrorCode:" << retErrorCode );
+                       LoggerD(">>> retERrorCode:" << retErrorCode );
                        return retErrorCode;
                }