wrt-plugins-tizen_0.4.23
[framework/web/wrt-plugins-tizen.git] / src / Tizen / JSSimpleCoordinates.cpp
index 664095d..85b26c5 100644 (file)
 #include "JSSimpleCoordinates.h"
 
 #include <string>
-#include <dpl/log/log.h>
 #include <dpl/shared_ptr.h>
 #include <JSWebAPIException.h>
 #include <JSUtil.h>
 #include <ArgumentValidator.h>
+#include <Logger.h>
 
 #define ATTRIBUTE_FILTER_CLASS_NAME "SimpleCoordinates"
 
@@ -111,7 +111,7 @@ JSObjectRef JSSimpleCoordinates::createJSObject(JSContextRef context, SimpleCoor
        JSObjectRef jsObjectRef = JSObjectMake(context, getClassRef(), static_cast<void*>(priv));
        if (NULL == jsObjectRef)
        {
-               LogError("object creation error");
+               LoggerE("object creation error");
                return NULL;
        }
        return jsObjectRef;
@@ -123,7 +123,7 @@ JSObjectRef JSSimpleCoordinates::constructor(JSContextRef context,
                const JSValueRef arguments[],
                JSValueRef* exception)
 {
-       LogDebug("entered");
+       LoggerD("entered");
 
        ArgumentValidator validator(context, argumentCount, arguments);
 
@@ -152,7 +152,7 @@ JSObjectRef JSSimpleCoordinates::constructor(JSContextRef context,
        }
        Catch(Exception)
        {
-               LogError("Argument type mismatch : " << _rethrown_exception.GetMessage());
+               LoggerE("Argument type mismatch : " << _rethrown_exception.GetMessage());
                JSObjectRef exceptionObj = JSWebAPIException::makeJSWebAPIException(
                                context, TypeMismatchException("Error occurred while creating object"));
                *exception = exceptionObj;
@@ -189,7 +189,7 @@ void JSSimpleCoordinates::Finalize(JSObjectRef object)
 
 SimpleCoordinatesPtr JSSimpleCoordinates::getPrivData(JSObjectRef object)
 {
-       LogDebug("entered");
+       LoggerD("entered");
        JSSimpleCoordinatesPriv *priv = static_cast<JSSimpleCoordinatesPriv*>(JSObjectGetPrivate(object));
        if (!priv)
                ThrowMsg(WrtDeviceApis::Commons::NullPointerException, "Private object is null");
@@ -206,7 +206,7 @@ JSValueRef JSSimpleCoordinates::getLatitude(JSContextRef context,
                JSStringRef propertyName,
                JSValueRef* exception)
 {
-       LogDebug("entered");
+       LoggerD("entered");
 
        try
        {
@@ -215,7 +215,7 @@ JSValueRef JSSimpleCoordinates::getLatitude(JSContextRef context,
        }
        catch(BasePlatformException &e)
        {
-               LogWarning("trying to get incorrect value [" << e.getName() << "] " << e.getMessage());
+               LoggerW("trying to get incorrect value [" << e.getName() << "] " << e.getMessage());
        }
 
        return JSValueMakeUndefined(context);
@@ -227,7 +227,7 @@ bool JSSimpleCoordinates::setLatitude(JSContextRef context,
                JSValueRef value,
                JSValueRef* exception)
 {
-       LogDebug("entered");
+       LoggerD("entered");
 
        try
        {
@@ -236,7 +236,7 @@ bool JSSimpleCoordinates::setLatitude(JSContextRef context,
        }
        catch(BasePlatformException &e)
        {
-               LogWarning("trying to set incorrect value [" << e.getName() << "] " << e.getMessage());
+               LoggerW("trying to set incorrect value [" << e.getName() << "] " << e.getMessage());
        }
 
        return true;
@@ -247,7 +247,7 @@ JSValueRef JSSimpleCoordinates::getLongitude(JSContextRef context,
                JSStringRef propertyName,
                JSValueRef* exception)
 {
-       LogDebug("entered");
+       LoggerD("entered");
 
        try
        {
@@ -256,7 +256,7 @@ JSValueRef JSSimpleCoordinates::getLongitude(JSContextRef context,
        }
        catch(BasePlatformException &e)
        {
-               LogWarning("trying to get incorrect value [" << e.getName() << "] " << e.getMessage());
+               LoggerW("trying to get incorrect value [" << e.getName() << "] " << e.getMessage());
        }
 
        return JSValueMakeUndefined(context);
@@ -268,7 +268,7 @@ bool JSSimpleCoordinates::setLongitude(JSContextRef context,
                JSValueRef value,
                JSValueRef* exception)
 {
-       LogDebug("entered");
+       LoggerD("entered");
 
        try
        {
@@ -277,7 +277,7 @@ bool JSSimpleCoordinates::setLongitude(JSContextRef context,
        }
        catch(BasePlatformException &e)
        {
-               LogWarning("trying to set incorrect value [" << e.getName() << "] " << e.getMessage());
+               LoggerW("trying to set incorrect value [" << e.getName() << "] " << e.getMessage());
        }
 
        return true;