wrt-plugins-tizen_0.4.23
[framework/web/wrt-plugins-tizen.git] / src / Contact / JSContactRef.cpp
old mode 100755 (executable)
new mode 100644 (file)
index 7925cbe..0a8c775
  * @brief       Implementation of the JSContactRef class
  */
 
-#include <dpl/log/log.h>
 #include <dpl/shared_ptr.h>
 #include <CommonsJavaScript/Validator.h>
 #include <JSTizenExceptionFactory.h>
 #include <JSTizenException.h>
 #include "ContactConverter.h"
 #include "JSContactRef.h"
+#include <Logger.h>
 
 #define CONTACT_CLASS_NAME                                     "ContactRef"
 #define CONTACT_PROP_ATTR_ADDRESS_BOOK_ID                      "addressBookId"
@@ -133,7 +133,7 @@ JSObjectRef JSContactRef::createJSObject(JSContextRef context, ContactRefPtr con
        JSObjectRef jsObjectRef = JSObjectMake(context, getClassRef(), static_cast<void*>(priv));
        if (NULL == jsObjectRef)
        {
-               LogError("object creation error");
+               LoggerE("object creation error");
                return NULL;
        }
        return jsObjectRef;
@@ -160,7 +160,7 @@ JSObjectRef JSContactRef::constructor(JSContextRef context,
                const JSValueRef arguments[],
                JSValueRef* exception)
 {
-       LogDebug("entered");
+       LoggerD("entered");
 
        JSContactRefPriv *priv = static_cast<JSContactRefPriv*>(JSObjectGetPrivate(constructor));
        if (!priv) {
@@ -180,7 +180,7 @@ JSObjectRef JSContactRef::constructor(JSContextRef context,
                        ThrowMsg(InvalidArgumentException, "2nd argument must be contact id");
 
        } Catch(Exception ) {
-               LogError("Argument type mismatch : " << _rethrown_exception.GetMessage());
+               LoggerE("Argument type mismatch : " << _rethrown_exception.GetMessage());
                *exception = JSTizenExceptionFactory::makeErrorObject(context, JSTizenException::INVALID_VALUES_ERROR, "Wrong arguments");
                return NULL;
        }
@@ -193,7 +193,7 @@ JSObjectRef JSContactRef::constructor(JSContextRef context,
        Try {
                addressBookId = converter->toString(arguments[0]);
        } Catch(Exception) {
-               LogError("Argument type mismatch : " << _rethrown_exception.GetMessage());
+               LoggerE("Argument type mismatch : " << _rethrown_exception.GetMessage());
                *exception = JSTizenExceptionFactory::makeErrorObject(context, JSTizenException::TYPE_MISMATCH_ERROR, "Wrong arguments");
                return NULL;
        }
@@ -201,7 +201,7 @@ JSObjectRef JSContactRef::constructor(JSContextRef context,
        Try {
                contactId = converter->toString(arguments[1]);
        } Catch(Exception) {
-               LogError("Argument type mismatch : " << _rethrown_exception.GetMessage());
+               LoggerE("Argument type mismatch : " << _rethrown_exception.GetMessage());
                *exception = JSTizenExceptionFactory::makeErrorObject(context, JSTizenException::TYPE_MISMATCH_ERROR, "Wrong arguments");
                return NULL;
        }
@@ -215,7 +215,7 @@ JSObjectRef JSContactRef::constructor(JSContextRef context,
        Try {
                jsobject = createJSObject(gContext, contactRef);
        } Catch(Exception) {
-               LogError("Argument type mismatch : " << _rethrown_exception.GetMessage());
+               LoggerE("Argument type mismatch : " << _rethrown_exception.GetMessage());
                *exception = JSTizenExceptionFactory::makeErrorObject(context, JSTizenException::TYPE_MISMATCH_ERROR, "Wrong arguments");
                return NULL;
        }
@@ -245,7 +245,7 @@ JSValueRef JSContactRef::getAddressBookId(JSContextRef context,
        }
        Catch(WrtDeviceApis::Commons::Exception)
        {
-               LogWarning("trying to get incorrect value");
+               LoggerW("trying to get incorrect value");
        }
 
        return JSValueMakeUndefined(context);
@@ -267,7 +267,7 @@ bool JSContactRef::setAddressBookId(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");
@@ -288,7 +288,7 @@ JSValueRef JSContactRef::getContactId(JSContextRef context,
        }
        Catch(WrtDeviceApis::Commons::Exception)
        {
-               LogWarning("trying to get incorrect value");
+               LoggerW("trying to get incorrect value");
        }
 
        return JSValueMakeUndefined(context);
@@ -310,7 +310,7 @@ bool JSContactRef::setContactId(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");