wrt-plugins-tizen_0.4.23
[framework/web/wrt-plugins-tizen.git] / src / Contact / JSPerson.cpp
old mode 100755 (executable)
new mode 100644 (file)
index 4903f87..bd171cd
@@ -22,7 +22,6 @@
  * @brief       Implementation of the JSPerson class
  */
 
-#include <dpl/log/log.h>
 #include <dpl/shared_ptr.h>
 #include <CommonsJavaScript/Validator.h>
 #include <JSTizenExceptionFactory.h>
@@ -35,6 +34,7 @@
 #include <ArgumentValidator.h>
 #include <JSWebAPIError.h>
 #include <TimeTracer.h>
+#include <Logger.h>
 
 #define FILTER_CLASS_NAME               "Person"
 
@@ -153,7 +153,7 @@ JSObjectRef JSPerson::createJSObject(JSContextRef context, PersonPtr person)
        JSPersonPriv *priv = new JSPersonPriv(context, person);
        JSObjectRef jsObjectRef = JSObjectMake(context, getClassRef(), static_cast<void*>(priv));
        if (NULL == jsObjectRef) {
-               LogError("object creation error");
+               LoggerE("object creation error");
                return NULL;
        }
        return jsObjectRef;
@@ -197,7 +197,7 @@ JSValueRef JSPerson::getId(JSContextRef context,
        }
        Catch(WrtDeviceApis::Commons::Exception)
        {
-               LogWarning("trying to get incorrect value");
+               LoggerW("trying to get incorrect value");
        }
        return JSValueMakeUndefined(context);
 }
@@ -219,7 +219,7 @@ JSValueRef JSPerson::getDisplayName(JSContextRef context,
        }
        Catch(WrtDeviceApis::Commons::Exception)
        {
-               LogWarning("trying to get incorrect value");
+               LoggerW("trying to get incorrect value");
        }
        return JSValueMakeUndefined(context);
 }
@@ -241,7 +241,7 @@ JSValueRef JSPerson::getContactCount(JSContextRef context,
        }
        Catch(WrtDeviceApis::Commons::Exception)
        {
-               LogWarning("trying to get incorrect value");
+               LoggerW("trying to get incorrect value");
        }
        return JSValueMakeUndefined(context);
 }
@@ -263,7 +263,7 @@ JSValueRef JSPerson::getHasPhoneNumber(JSContextRef context,
        }
        Catch(WrtDeviceApis::Commons::Exception)
        {
-               LogWarning("trying to get incorrect value");
+               LoggerW("trying to get incorrect value");
        }
        return JSValueMakeUndefined(context);
 }
@@ -285,7 +285,7 @@ JSValueRef JSPerson::getHasEmail(JSContextRef context,
        }
        Catch(WrtDeviceApis::Commons::Exception)
        {
-               LogWarning("trying to get incorrect value");
+               LoggerW("trying to get incorrect value");
        }
 
        return JSValueMakeUndefined(context);
@@ -305,7 +305,7 @@ JSValueRef JSPerson::getIsFavorite(JSContextRef context,
        }
        Catch(WrtDeviceApis::Commons::Exception)
        {
-               LogWarning("trying to get incorrect value");
+               LoggerW("trying to get incorrect value");
        }
 
        return JSValueMakeUndefined(context);
@@ -325,7 +325,7 @@ bool JSPerson::setIsFavorite(JSContextRef context,
        }
        Catch(WrtDeviceApis::Commons::Exception)
        {
-               LogWarning("trying to set incorrect value");
+               LoggerW("trying to set incorrect value");
                JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, "Type mismatch");
        }
 
@@ -349,7 +349,7 @@ JSValueRef JSPerson::getPhotoURI(JSContextRef context,
        }
        Catch(WrtDeviceApis::Commons::Exception)
        {
-               LogWarning("trying to get incorrect value");
+               LoggerW("trying to get incorrect value");
        }
 
        return JSValueMakeUndefined(context);
@@ -374,7 +374,7 @@ bool JSPerson::setPhotoURI(JSContextRef context,
        }
        Catch(WrtDeviceApis::Commons::Exception)
        {
-               LogWarning("trying to set incorrect value");
+               LoggerW("trying to set incorrect value");
                JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, "Type mismatch");
        }
 
@@ -398,7 +398,7 @@ JSValueRef JSPerson::getRingtoneURI(JSContextRef context,
        }
        Catch(WrtDeviceApis::Commons::Exception)
        {
-               LogWarning("trying to get incorrect value");
+               LoggerW("trying to get incorrect value");
        }
 
        return JSValueMakeUndefined(context);
@@ -423,7 +423,7 @@ bool JSPerson::setRingtoneURI(JSContextRef context,
        }
        Catch(WrtDeviceApis::Commons::Exception)
        {
-               LogWarning("trying to set incorrect value");
+               LoggerW("trying to set incorrect value");
                JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, "Type mismatch");
        }
 
@@ -446,7 +446,7 @@ JSValueRef JSPerson::getDisplayContactId(JSContextRef context,
        }
        Catch(WrtDeviceApis::Commons::Exception)
        {
-               LogWarning("trying to get incorrect value");
+               LoggerW("trying to get incorrect value");
        }
 
        return JSValueMakeUndefined(context);
@@ -470,7 +470,7 @@ bool JSPerson::setDisplayContactId(JSContextRef context,
        }
        Catch(WrtDeviceApis::Commons::Exception)
        {
-               LogWarning("trying to set incorrect value");
+               LoggerW("trying to set incorrect value");
                JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, "Type mismatch");
        }
 
@@ -484,7 +484,7 @@ JSValueRef JSPerson::link(JSContextRef context,
                const JSValueRef arguments[],
                JSValueRef* exception)
 {
-       LogDebug("entered");
+       LoggerD("entered");
        TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
        PersonPtr person(NULL);
 
@@ -496,7 +496,7 @@ JSValueRef JSPerson::link(JSContextRef context,
        }
        Catch(Exception)
        {
-               LogError("Argument type mismatch : " << _rethrown_exception.GetMessage());
+               LoggerE("Argument type mismatch : " << _rethrown_exception.GetMessage());
                return JSTizenExceptionFactory::postException(context, exception,
                                JSTizenException::TYPE_MISMATCH_ERROR, "Wrong object");
        }
@@ -529,13 +529,13 @@ JSValueRef JSPerson::link(JSContextRef context,
        }
        Catch(ConversionException)
        {
-               LogError("Error on platform : " << _rethrown_exception.GetMessage());
+               LoggerE("Error on platform : " << _rethrown_exception.GetMessage());
                return JSTizenExceptionFactory::postException(context, exception,
                                JSTizenException::TYPE_MISMATCH_ERROR, "1st argument must be 'PersonId'");
        }
        Catch(Exception)
        {
-               LogError("Error on platform : " << _rethrown_exception.GetMessage());
+               LoggerE("Error on platform : " << _rethrown_exception.GetMessage());
                return JSTizenExceptionFactory::postException(context, exception,
                                JSTizenException::UNKNOWN_ERROR, "Internal error");
        }
@@ -576,7 +576,7 @@ JSValueRef JSPerson::unlink(JSContextRef context,
                const JSValueRef arguments[],
                JSValueRef* exception)
 {
-       LogDebug("entered");
+       LoggerD("entered");
        TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
        PersonPtr person(NULL);
 
@@ -588,7 +588,7 @@ JSValueRef JSPerson::unlink(JSContextRef context,
        }
        Catch(Exception)
        {
-               LogError("Argument type mismatch : " << _rethrown_exception.GetMessage());
+               LoggerE("Argument type mismatch : " << _rethrown_exception.GetMessage());
                return JSTizenExceptionFactory::postException(context, exception,
                                JSTizenException::TYPE_MISMATCH_ERROR, "Wrong object");
        }
@@ -621,13 +621,13 @@ JSValueRef JSPerson::unlink(JSContextRef context,
        }
        Catch(ConversionException)
        {
-               LogError("Error on platform : " << _rethrown_exception.GetMessage());
+               LoggerE("Error on platform : " << _rethrown_exception.GetMessage());
                return JSTizenExceptionFactory::postException(context, exception,
                                JSTizenException::TYPE_MISMATCH_ERROR, "1st argument must be 'ContactId'");
        }
        Catch(Exception)
        {
-               LogError("Error on platform : " << _rethrown_exception.GetMessage());
+               LoggerE("Error on platform : " << _rethrown_exception.GetMessage());
                return JSTizenExceptionFactory::postException(context, exception,
                                JSTizenException::UNKNOWN_ERROR, "Internal error");
        }
@@ -673,7 +673,7 @@ JSValueRef JSPerson::unlink(JSContextRef context,
        }
        Catch(Exception)
        {
-               LogError("Error on conversion : " << _rethrown_exception.GetMessage());
+               LoggerE("Error on conversion : " << _rethrown_exception.GetMessage());
                return JSTizenExceptionFactory::postException(context, exception,
                                JSTizenException::UNKNOWN_ERROR, "Internal error");
        }