wrt-plugins-tizen_0.4.23
[framework/web/wrt-plugins-tizen.git] / src / Contact / JSContactAnniversary.cpp
old mode 100755 (executable)
new mode 100644 (file)
index f5b234e..ce89d5f
@@ -28,6 +28,7 @@
 #include <JSTizenException.h>
 #include "ContactConverter.h"
 #include "JSContactAnniversary.h"
+#include <Logger.h>
 
 #define FILTER_CLASS_NAME "Anniversary"
 #define CONTACT_ATTR_DATE "date"
@@ -127,7 +128,7 @@ JSObjectRef JSContactAnniversary::createJSObject(JSContextRef context, ContactAn
        JSContactAnniversaryPriv *priv = new JSContactAnniversaryPriv(context, contactAnniversary);
        JSObjectRef jsObjectRef = JSObjectMake(context, getClassRef(), static_cast<void*>(priv));
        if (NULL == jsObjectRef) {
-               LogError("object creation error");
+               LoggerE("object creation error");
                return NULL;
        }
        return jsObjectRef;
@@ -152,7 +153,7 @@ JSObjectRef JSContactAnniversary::constructor(JSContextRef context,
                const JSValueRef arguments[],
                JSValueRef* exception)
 {
-       LogDebug("entered");
+       LoggerD("entered");
 
        JSContactAnniversaryPriv *priv = static_cast<JSContactAnniversaryPriv*>(JSObjectGetPrivate(constructor));
        if (!priv) {
@@ -193,7 +194,7 @@ JSObjectRef JSContactAnniversary::constructor(JSContextRef context,
                date = converter->toDateTm(arguments[0]);
                contactAnniversary->setDate(date);
        } Catch(Exception) {
-               LogError("Argument type mismatch : " << _rethrown_exception.GetMessage());
+               LoggerE("Argument type mismatch : " << _rethrown_exception.GetMessage());
                *exception = JSTizenExceptionFactory::makeErrorObject(context, JSTizenException::TYPE_MISMATCH_ERROR, "1st argument must be a 'Date object'");
                return NULL;
        }
@@ -203,7 +204,7 @@ JSObjectRef JSContactAnniversary::constructor(JSContextRef context,
        Try {
                jsobject = createJSObject(gContext, contactAnniversary);
        } 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;
        }
@@ -233,7 +234,7 @@ JSValueRef JSContactAnniversary::getDate(JSContextRef context,
        }
        Catch(WrtDeviceApis::Commons::Exception)
        {
-               LogWarning("trying to get incorrect value");
+               LoggerW("trying to get incorrect value");
        }
        return JSValueMakeUndefined(context);
 }
@@ -253,7 +254,7 @@ bool JSContactAnniversary::setDate(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");
        }
        return true;
@@ -276,7 +277,7 @@ JSValueRef JSContactAnniversary::getLabel(JSContextRef context,
        }
        Catch(WrtDeviceApis::Commons::Exception)
        {
-               LogWarning("trying to get incorrect value");
+               LoggerW("trying to get incorrect value");
        }
        return JSValueMakeUndefined(context);
 }
@@ -301,7 +302,7 @@ bool JSContactAnniversary::setLabel(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");
        }
        return true;