wrt-plugins-tizen_0.4.23
[framework/web/wrt-plugins-tizen.git] / src / Messaging / JSMessage.cpp
index 91fe7ae..e12ae06 100644 (file)
@@ -128,14 +128,14 @@ JSValueRef JSMessage::createJSObject(JSContextRef context,
                const std::string& msgId)
 {
        IMessagePtr msg;
-       LogDebug("createJSObject with account ");
+       LoggerD("createJSObject with account ");
 
        Try
        {
                if (msgType == EMAIL)
                {
-                       LogDebug("Account Address:" << &account);
-                       LogDebug("Account Data ,ID" << account.getId() << "name:" << account.getName() << " Account:" << account.getAddress());
+                       LoggerD("Account Address:" << &account);
+                       LoggerD("Account Data ,ID" << account.getId() << "name:" << account.getName() << " Account:" << account.getAddress());
 
                        msg = MessageFactory::createMessage(msgType, account, msgId);
                        if (!msg)
@@ -147,7 +147,7 @@ JSValueRef JSMessage::createJSObject(JSContextRef context,
                }
        }
        Catch(WrtDeviceApis::Commons::UnknownException) {
-               LogError("wrong message type, object not created");
+               LoggerE("wrong message type, object not created");
                return JSValueMakeUndefined(context);
        }
 
@@ -175,7 +175,7 @@ JSValueRef JSMessage::createJSObject(JSContextRef context,
                }
        }
        Catch(WrtDeviceApis::Commons::UnknownException) {
-               LogError("wrong message type, object not created");
+               LoggerE("wrong message type, object not created");
                return JSValueMakeUndefined(context);
        }
        return createJSObject(context, msg, listener);
@@ -191,7 +191,7 @@ JSValueRef JSMessage::createJSObject(JSContextRef context,
        JSObjectRef jsValueRef = JSObjectMake(context, jsClassRef, static_cast<void*>(priv));
        JSClassRelease(jsClassRef);
        if (NULL == jsValueRef) {
-               LogError("object creation error");
+               LoggerE("object creation error");
                return JSValueMakeUndefined(context);
        }
        return jsValueRef;
@@ -200,17 +200,17 @@ JSValueRef JSMessage::createJSObject(JSContextRef context,
 JSValueRef JSMessage::createJSObject(JSContextRef context,
         const IMessagePtr& msg)
 {
-       LogDebug("createJSObject");
+       LoggerD("createJSObject");
        JSClassRef jsClassRef = JSClassCreate(getClassInfo());
-       LogDebug("jsClassRef success");
+       LoggerD("jsClassRef success");
        JSMessagePrivateObject* priv = new JSMessagePrivateObject(context, msg);
-       LogDebug("priv success");
+       LoggerD("priv success");
 
        JSObjectRef jsValueRef = JSObjectMake(context, jsClassRef, static_cast<void*>(priv));
-       LogDebug("JSObjectMake success");
+       LoggerD("JSObjectMake success");
        JSClassRelease(jsClassRef);
        if (NULL == jsValueRef) {
-               LogError("object creation error");
+               LoggerE("object creation error");
                return JSValueMakeUndefined(context);
        }
        return jsValueRef;
@@ -234,7 +234,7 @@ JSValueRef JSMessage::createJSObject(JSContextRef context,
                }
        }
        Catch(WrtDeviceApis::Commons::UnknownException) {
-               LogError("wrong message type, object not created");
+               LoggerE("wrong message type, object not created");
                return JSValueMakeUndefined(context);
        }
        return createJSObject(context, msg, NULL);
@@ -250,7 +250,7 @@ JSValueRef JSMessage::createDummyMessageJSObject(JSContextRef context,
        }
        else
        {
-               LogError("message type is invalid");
+               LoggerE("message type is invalid");
                Throw(WrtDeviceApis::Commons::InvalidArgumentException);
        }
        return createJSObject(context, msg);
@@ -259,7 +259,7 @@ JSValueRef JSMessage::createDummyMessageJSObject(JSContextRef context,
 void JSMessage::initialize(JSContextRef context,
         JSObjectRef object)
 {
-       LogInfo("enter");
+       LoggerI("enter");
 
        if (!JSObjectGetPrivate(object))
        {
@@ -267,7 +267,7 @@ void JSMessage::initialize(JSContextRef context,
                JSMessagePrivateObject *priv = new JSMessagePrivateObject(context, msg);
                if (!JSObjectSetPrivate(object, priv))
                {
-                       LogInfo("set Private Failed...");
+                       LoggerI("set Private Failed...");
                        delete priv;
                }
        }
@@ -277,7 +277,7 @@ void JSMessage::finalize(JSObjectRef object)
 {
        JSMessagePrivateObject* priv = static_cast<JSMessagePrivateObject*>(JSObjectGetPrivate(object));
        if (priv) {
-               LogDebug("deleting private object");
+               LoggerD("deleting private object");
                delete priv;
                JSObjectSetPrivate(object, NULL);
        }
@@ -295,7 +295,7 @@ JSValueRef JSMessage::getProperty(JSContextRef context,
         JSStringRef propertyName,
         JSValueRef* exception)
 {
-    LogInfo("Main getProperty()");
+    LoggerI("Main getProperty()");
     int index = 0;
     // for non-NULL property names
     while(m_property[index].name != NULL) {
@@ -320,7 +320,7 @@ bool JSMessage::setProperty(JSContextRef context,
         JSValueRef value,
         JSValueRef* exception)
 {
-    LogInfo("Main setProperty()");
+    LoggerI("Main setProperty()");
     int index = 0;
     // for non-NULL property names
     while(m_property[index].name != NULL) {
@@ -344,7 +344,7 @@ bool JSMessage::deleteProperty(JSContextRef context,
         JSStringRef propertyName,
         JSValueRef* exception)
 {
-       LogInfo("enter");
+       LoggerI("enter");
        return true;
 }
 
@@ -352,13 +352,13 @@ void JSMessage::getPropertyNames(JSContextRef context,
         JSObjectRef object,
         JSPropertyNameAccumulatorRef propertyNames)
 {
-       LogInfo("enter");
+       LoggerI("enter");
 
     JSStringRef propertyName = NULL;
     int index = 0;
     // repeat for each declared property - until null on property name
     while(m_property[index].name != NULL) {
-        LogDebug("Property: " << m_property[index].name);
+        LoggerD("Property: " << m_property[index].name);
         propertyName = JSStringCreateWithUTF8CString(m_property[index].name);
         JSPropertyNameAccumulatorAddName(propertyNames, propertyName);
         JSStringRelease(propertyName);
@@ -373,7 +373,7 @@ JSValueRef JSMessage::callAsFunction(JSContextRef context,
         const JSValueRef arguments[],
         JSValueRef* exception)
 {
-       LogInfo("enter");
+       LoggerI("enter");
        return JSValueMakeUndefined(context);
 }
 
@@ -382,7 +382,7 @@ bool JSMessage::hasInstance(JSContextRef context,
         JSValueRef possibleInstance,
         JSValueRef* exception)
 {
-       LogInfo("enter");
+       LoggerI("enter");
        return true;
 }
 
@@ -392,7 +392,7 @@ JSObjectRef JSMessage::constructor(JSContextRef context,
         const JSValueRef arguments[],
         JSValueRef* exception)
 {
-    LogDebug("entered");
+    LoggerD("entered");
 
     try {
         ArgumentValidator validator(context, argumentCount, arguments);
@@ -414,18 +414,18 @@ JSObjectRef JSMessage::constructor(JSContextRef context,
         else
         {
             // this should never happen - message type checking done in stringToMessageType()
-            LogError("message type is invalid");
+            LoggerE("message type is invalid");
             throw TypeMismatchException("Invalid message type");
         }
 
         if (msg == NULL) {
-            LogDebug("Message Creation failed");
+            LoggerD("Message Creation failed");
             throw DeviceAPI::Common::UnknownException("Message has been not created");
         }
 
         if (dictionary != NULL)
         {
-            LogDebug ("##### msg type is " << msgType);
+            LoggerD ("##### msg type is " << msgType);
 
             JSValueRef subjectData = JSUtil::getProperty(context, dictionary, MESSAGE_ATTRIBUTE_SUBJECT);
             JSValueRef toData = JSUtil::getProperty(context, dictionary, MESSAGE_ATTRIBUTE_TO);
@@ -439,7 +439,7 @@ JSObjectRef JSMessage::constructor(JSContextRef context,
             if (!JSValueIsUndefined(context, subjectData) )
             {
                 std::string subject = JSUtil::JSValueToString(context, subjectData);
-                LogDebug (" Subject : " << subject);
+                LoggerD (" Subject : " << subject);
                 switch (msgType)
                 {
                     case MMS:
@@ -456,7 +456,7 @@ JSObjectRef JSMessage::constructor(JSContextRef context,
                     }
                     default:
                     {
-                        LogError("message not supported");
+                        LoggerE("message not supported");
                         //Throw(WrtDeviceApis::Commons::UnsupportedException);
                         //break;
                     }
@@ -466,7 +466,7 @@ JSObjectRef JSMessage::constructor(JSContextRef context,
             if (!JSValueIsUndefined(context, toData) )
             {
                 Recipients to = converter->toRecipients(toData);
-                LogDebug("setting to field, size=" << to.getRecipientSize());
+                LoggerD("setting to field, size=" << to.getRecipientSize());
                 msg->setToRecipients(to);
             }
             //cc
@@ -488,7 +488,7 @@ JSObjectRef JSMessage::constructor(JSContextRef context,
                 if (!JSValueIsUndefined(context, htmlBodyData))
                 {
                     std::string body = JSUtil::JSValueToString(context, htmlBodyData);
-                    LogDebug("html body : " << body);
+                    LoggerD("html body : " << body);
                     email->setHtmlBody(body);
                 }
 
@@ -500,28 +500,28 @@ JSObjectRef JSMessage::constructor(JSContextRef context,
             if (!JSValueIsUndefined(context, plainBodyData) )
             {
                 std::string body = JSUtil::JSValueToString(context, plainBodyData);
-                LogDebug("plain body  : " << body);
+                LoggerD("plain body  : " << body);
                 msg->setBody(body);
             }
         }
 
         //return
         JSClassRef jsClassRef = JSClassCreate(JSMessage::getClassInfo());
-        LogDebug("jsClassRef success");
+        LoggerD("jsClassRef success");
         JSMessagePrivateObject* priv = new JSMessagePrivateObject(context, msg);
-        LogDebug("priv success");
+        LoggerD("priv success");
 
         JSObjectRef jsObjRef = JSObjectMake(context, jsClassRef, static_cast<void*>(priv));
-        LogDebug("JSObjectMake success");
+        LoggerD("JSObjectMake success");
         JSClassRelease(jsClassRef);
         if (NULL == jsObjRef) {
-            LogError("JSObject creation error");
+            LoggerE("JSObject creation error");
             throw DeviceAPI::Common::UnknownException("JSObject make error");
         }
         return jsObjRef;
     }
     catch(BasePlatformException &bex) {
-        LogError("Message creation failed: " << bex.getMessage());
+        LoggerE("Message creation failed: " << bex.getMessage());
         JSObjectRef error = JSWebAPIError::makeJSWebAPIError(context, bex);
         *exception = error;
         return NULL;
@@ -540,7 +540,7 @@ JSValueRef JSMessage::convertToType(JSContextRef context,
         JSType type,
         JSValueRef* exception)
 {
-    LogInfo("enter");
+    LoggerI("enter");
     return JSValueMakeUndefined(context);
 }
 
@@ -549,11 +549,11 @@ JSValueRef JSMessage::getAttachments(JSContextRef context,
         JSStringRef propertyName,
         JSValueRef* exception)
 {
-       LogInfo("enter");
+       LoggerI("enter");
        try {
         GlobalContextManager *gcm = GlobalContextManager::getInstance();
         if(gcm == NULL) {
-            LogError("Failed to get GlobalContextManager");
+            LoggerE("Failed to get GlobalContextManager");
             throw DeviceAPI::Common::UnknownException("Unable to receive global context");
         }
                JSContextRef globalContext = gcm->getGlobalContext(context);
@@ -561,7 +561,7 @@ JSValueRef JSMessage::getAttachments(JSContextRef context,
                ConverterMessageFactory::ConverterType converter = ConverterMessageFactory::getConverter(context);
                IMessagePtr msg = converter->toIMessage(object);
                MessageType msgType = msg->getMessageType();
-               LogInfo("msgType=" << msgType);
+               LoggerI("msgType=" << msgType);
                // prepare common values
                JSCallbackManagerPtr emptyCallbackMgr = JSCallbackManager::createObject(globalContext, NULL, NULL);
 
@@ -587,13 +587,13 @@ JSValueRef JSMessage::getAttachments(JSContextRef context,
                                }
 
                                int count = attachments.size();
-                               LogDebug( "count : " << count);
+                               LoggerD( "count : " << count);
 
                                JSObjectRef jsMessageAttachmentObject[count];   //make
 
                                for (unsigned int index = 0 ; index < attachments.size(); index++ )
                                {
-                                       LogDebug( "Attachment ID : " << attachments[index]->getAttachmentID());
+                                       LoggerD( "Attachment ID : " << attachments[index]->getAttachmentID());
                                        jsMessageAttachmentObject[index] = JSMessageAttachment::createJS(globalContext, attachments[index] );
                                }
                                JSObjectRef result = JSObjectMakeArray(globalContext, count, jsMessageAttachmentObject, NULL);
@@ -604,13 +604,13 @@ JSValueRef JSMessage::getAttachments(JSContextRef context,
                                JSObjectRef arrayValue = JSObjectMakeArray(globalContext, 0, NULL, NULL);
                                if (NULL == arrayValue)
                                {
-                                       LogError("Could not create js array object");
+                                       LoggerE("Could not create js array object");
                                        return JSValueMakeUndefined(context);
                                }
                                return arrayValue;
                        }
                        default:
-                               LogError("Not supported message type");
+                               LoggerE("Not supported message type");
                 /* unsupported type -> type is integral message attribute
                  * so error at this place means internal api error*/
                 throw DeviceAPI::Common::NotSupportedException("Unsupported message type");
@@ -618,11 +618,11 @@ JSValueRef JSMessage::getAttachments(JSContextRef context,
                }
        }
     catch(BasePlatformException &bex) {
-        LogError("Attachments getting failure: " << bex.getMessage());
+        LoggerE("Attachments getting failure: " << bex.getMessage());
         return JSValueMakeUndefined(context);
     }
     catch(...) {
-        LogError("UnknownError when getting attachments.");
+        LoggerE("UnknownError when getting attachments.");
         return JSValueMakeUndefined(context);
     }
 }
@@ -633,7 +633,7 @@ JSValueRef JSMessage::getBccAddress(JSContextRef context,
         JSStringRef propertyName,
         JSValueRef* exception)
 {
-       LogDebug("enter");
+       LoggerD("enter");
        try {
                ConverterMessageFactory::ConverterType converter = ConverterMessageFactory::getConverter(context);
                IMessagePtr msg = converter->toIMessage(object);
@@ -648,7 +648,7 @@ JSValueRef JSMessage::getBccAddress(JSContextRef context,
                                JSObjectRef arrayValue = JSObjectMakeArray(context, 0, NULL, NULL);
                                if (NULL == arrayValue)
                                {
-                                       LogError("Could not create js array object");
+                                       LoggerE("Could not create js array object");
                                        return JSValueMakeUndefined(context);
                                }
                 JSValueRef referr;
@@ -672,13 +672,13 @@ JSValueRef JSMessage::getBccAddress(JSContextRef context,
                                JSObjectRef arrayValue = JSObjectMakeArray(context, 0, NULL, NULL);
                                if (NULL == arrayValue)
                                {
-                                       LogError("Could not create js array object");
+                                       LoggerE("Could not create js array object");
                                        return JSValueMakeUndefined(context);
                                }
                                return arrayValue;
                        }
                        default:
-                LogError("not supported message type");
+                LoggerE("not supported message type");
                 /* unsupported type -> type is integral message attribute
                  * so error at this place means internal api error*/
                 throw DeviceAPI::Common::NotSupportedException("Unsupported message type");
@@ -686,11 +686,11 @@ JSValueRef JSMessage::getBccAddress(JSContextRef context,
                }
        }
     catch(BasePlatformException &bex) {
-        LogError("BCC addressess getting failure: " << bex.getMessage());
+        LoggerE("BCC addressess getting failure: " << bex.getMessage());
         return JSValueMakeUndefined(context);
     }
     catch(...) {
-        LogError("UnknownError when getting BCC addressess.");
+        LoggerE("UnknownError when getting BCC addressess.");
         return JSValueMakeUndefined(context);
     }
 }
@@ -710,11 +710,11 @@ JSValueRef JSMessage::getBody(JSContextRef context,
         /* Currently this exception will not be caught here as converter
          * is using od-style, DPL exceptions. This catch sections
          * is prepared for future converter refactoring */
-        LogError("Message body getting failure: " << bex.getMessage());
+        LoggerE("Message body getting failure: " << bex.getMessage());
         return JSValueMakeUndefined(context);
     }
     catch(...) {
-        LogError("UnknownError when getting Message body.");
+        LoggerE("UnknownError when getting Message body.");
         return JSValueMakeUndefined(context);;
     }
 }
@@ -724,7 +724,7 @@ JSValueRef JSMessage::getCcAddress(JSContextRef context,
         JSStringRef propertyName,
         JSValueRef* exception)
 {
-       LogDebug("enter");
+       LoggerD("enter");
        try {
                ConverterMessageFactory::ConverterType converter = ConverterMessageFactory::getConverter(context);
                IMessagePtr msg = converter->toIMessage(object);
@@ -739,7 +739,7 @@ JSValueRef JSMessage::getCcAddress(JSContextRef context,
                                JSObjectRef arrayValue = JSObjectMakeArray(context, 0, NULL, NULL);
                                if (NULL == arrayValue)
                                {
-                                       LogError("Could not create js array object");
+                                       LoggerE("Could not create js array object");
                                        return JSValueMakeUndefined(context);
                                }
                 JSValueRef referr;
@@ -763,13 +763,13 @@ JSValueRef JSMessage::getCcAddress(JSContextRef context,
                                JSObjectRef arrayValue = JSObjectMakeArray(context, 0, NULL, NULL);
                                if (NULL == arrayValue)
                                {
-                                       LogError("Could not create js array object");
+                                       LoggerE("Could not create js array object");
                                        return JSValueMakeUndefined(context);
                                }
                                return arrayValue;
                        }
                        default:
-                               LogError("not supported message type");
+                               LoggerE("not supported message type");
                 /* unsupported type -> type is integral message attribute
                  * so error at this place means internal api error*/
                 throw DeviceAPI::Common::NotSupportedException("Unsupported message type");
@@ -777,11 +777,11 @@ JSValueRef JSMessage::getCcAddress(JSContextRef context,
                }
     }
     catch(BasePlatformException &bex) {
-        LogError("CC addressess getting failure: " << bex.getMessage());
+        LoggerE("CC addressess getting failure: " << bex.getMessage());
         return JSValueMakeUndefined(context);
     }
     catch(...) {
-        LogError("UnknownError when getting CC addressess.");
+        LoggerE("UnknownError when getting CC addressess.");
         return JSValueMakeUndefined(context);
     }
 }
@@ -791,7 +791,7 @@ JSValueRef JSMessage::getDestinationAddress(JSContextRef context,
         JSStringRef propertyName,
         JSValueRef* exception)
 {
-       LogInfo("enter");
+       LoggerI("enter");
        try {
                ConverterMessageFactory::ConverterType converter = ConverterMessageFactory::getConverter(context);
                IMessagePtr msg = converter->toIMessage(object);
@@ -799,10 +799,10 @@ JSValueRef JSMessage::getDestinationAddress(JSContextRef context,
                JSObjectRef arrayValue = JSObjectMakeArray(context, 0, NULL, NULL);
                if (NULL == arrayValue)
                {
-                       LogError("Could not create js array object");
+                       LoggerE("Could not create js array object");
                        return JSValueMakeUndefined(context);
                }
-               LogError("getRecipientSize() : " << recipient->getRecipientSize());
+               LoggerE("getRecipientSize() : " << recipient->getRecipientSize());
         JSValueRef referr;
                for(size_t i = 0; i < recipient->getRecipientSize(); i++)
                {
@@ -818,11 +818,11 @@ JSValueRef JSMessage::getDestinationAddress(JSContextRef context,
                return arrayValue;
        }
     catch(BasePlatformException &bex) {
-        LogError("Destination addressess getting failure: " << bex.getMessage());
+        LoggerE("Destination addressess getting failure: " << bex.getMessage());
         return JSValueMakeUndefined(context);
     }
     catch(...) {
-        LogError("UnknownError when getting destination addressess.");
+        LoggerE("UnknownError when getting destination addressess.");
         return JSValueMakeUndefined(context);
     }
 }
@@ -842,11 +842,11 @@ JSValueRef JSMessage::getIsRead(JSContextRef context,
         /* Currently this exception will not be caught here as converter
          * is using od-style, DPL exceptions. This catch sections
          * is prepared for future converter refactoring */
-        LogError("Checking if message is read failure: " << bex.getMessage());
+        LoggerE("Checking if message is read failure: " << bex.getMessage());
         return JSValueMakeUndefined(context);
     }
     catch(...) {
-        LogError("UnknownError when checking if message is read.");
+        LoggerE("UnknownError when checking if message is read.");
         return JSValueMakeUndefined(context);
     }
 }
@@ -860,8 +860,8 @@ JSValueRef JSMessage::getMessageId(JSContextRef context,
                ConverterMessageFactory::ConverterType converter = ConverterMessageFactory::getConverter(context);
                IMessagePtr msg = converter->toIMessage(object);
                const string& id = msg->getIdRef();
-               LogDebug("msgId=" << id);
-               LogDebug("msg->getMessageStatus()=" << msg->getMessageStatus());
+               LoggerD("msgId=" << id);
+               LoggerD("msg->getMessageStatus()=" << msg->getMessageStatus());
                if((id.size() == 0) && msg->getMessageStatus() == MESSAGE_STATUS_CREATED)
                {
                        return JSValueMakeNull(context);
@@ -872,11 +872,11 @@ JSValueRef JSMessage::getMessageId(JSContextRef context,
         /* Currently this exception will not be caught here as converter
          * is using od-style, DPL exceptions. This catch sections
          * is prepared for future converter refactoring */
-        LogError("Getting message id failure: " << bex.getMessage());
+        LoggerE("Getting message id failure: " << bex.getMessage());
         return JSValueMakeUndefined(context);
     }
     catch(...) {
-        LogError("UnknownError when getting message id.");
+        LoggerE("UnknownError when getting message id.");
         return JSValueMakeUndefined(context);
     }
 }
@@ -894,13 +894,13 @@ JSValueRef JSMessage::getMessagePriority(JSContextRef context,
                switch (msgType) {
                        case SMS:
                        case MMS:
-                               LogError("priority : false");
+                               LoggerE("priority : false");
                                return converter->toJSValueRef(false);
                        case EMAIL:
                        {
                                IEmailPtr email = MessageFactory::convertToEmail(msg);
                                int tmpint = email->getPriority();
-                               LogError("priority : " << tmpint);
+                               LoggerE("priority : " << tmpint);
                                if(tmpint == MessagePriority::HIGH)
                                {
                                        return converter->toJSValueRef(true);
@@ -908,7 +908,7 @@ JSValueRef JSMessage::getMessagePriority(JSContextRef context,
                                return converter->toJSValueRef(false);
                        }
                        default:
-                               LogError("unsupported message type");
+                               LoggerE("unsupported message type");
                 /* unsupported type -> type is integral message attribute
                  * so error at this place means internal api error*/
                 throw DeviceAPI::Common::NotSupportedException("Unsupported message type");
@@ -916,11 +916,11 @@ JSValueRef JSMessage::getMessagePriority(JSContextRef context,
                }
        }
     catch(BasePlatformException &bex) {
-        LogError("Getting message priority failure: " << bex.getMessage());
+        LoggerE("Getting message priority failure: " << bex.getMessage());
         return JSValueMakeUndefined(context);
     }
     catch(...) {
-        LogError("UnknownError when getting message priority.");
+        LoggerE("UnknownError when getting message priority.");
         return JSValueMakeUndefined(context);
     }
 }
@@ -941,11 +941,11 @@ JSValueRef JSMessage::getMessageType(JSContextRef context,
         /* Currently this exception will not be caught here as converter
          * is using od-style, DPL exceptions. This catch sections
          * is prepared for future converter refactoring */
-        LogError("Getting message type failure: " << bex.getMessage());
+        LoggerE("Getting message type failure: " << bex.getMessage());
         return JSValueMakeUndefined(context);
     }
     catch(...) {
-        LogError("UnknownError when getting message type.");
+        LoggerE("UnknownError when getting message type.");
         return JSValueMakeUndefined(context);
     }
 }
@@ -959,10 +959,10 @@ JSValueRef JSMessage::getSourceAddress(JSContextRef context,
                ConverterMessageFactory::ConverterType converter = ConverterMessageFactory::getConverter(context);
                IMessagePtr msg = converter->toIMessage(object);
                string from = msg->getSourceAddress();
-               LogDebug("from =" << from);
+               LoggerD("from =" << from);
                if(from.size() == 0)
                {
-                       LogDebug("JSValueMakeNull");
+                       LoggerD("JSValueMakeNull");
                        return JSValueMakeNull(context);
                }
                return converter->toJSValueRef(from);
@@ -971,11 +971,11 @@ JSValueRef JSMessage::getSourceAddress(JSContextRef context,
         /* Currently this exception will not be caught here as converter
          * is using od-style, DPL exceptions. This catch sections
          * is prepared for future converter refactoring */
-        LogError("Getting message source address failure: " << bex.getMessage());
+        LoggerE("Getting message source address failure: " << bex.getMessage());
         return JSValueMakeUndefined(context);
     }
     catch(...) {
-        LogError("UnknownError when getting message source address.");
+        LoggerE("UnknownError when getting message source address.");
         return JSValueMakeUndefined(context);
     }
 }
@@ -1005,7 +1005,7 @@ JSValueRef JSMessage::getSubject(JSContextRef context,
                        case SMS:
                                return converter->toJSValueRef("");
                        default:
-                               LogError("message not support subject");
+                               LoggerE("message not support subject");
                 /* unsupported type -> type is integral message attribute
                  * so error at this place means internal api error*/
                 throw DeviceAPI::Common::NotSupportedException("Unsupported message type");
@@ -1013,11 +1013,11 @@ JSValueRef JSMessage::getSubject(JSContextRef context,
                }
        }
     catch(BasePlatformException &bex) {
-        LogError("Getting message subject failure: " << bex.getMessage());
+        LoggerE("Getting message subject failure: " << bex.getMessage());
         return JSValueMakeUndefined(context);
     }
     catch(...) {
-        LogError("UnknownError when getting message subject.");
+        LoggerE("UnknownError when getting message subject.");
         return JSValueMakeUndefined(context);
     }
 }
@@ -1032,11 +1032,11 @@ JSValueRef JSMessage::getTime(JSContextRef context,
                IMessagePtr msg = converter->toIMessage(object);
                struct tm dateTime = msg->getDateTime();
                const string& id = msg->getIdRef();
-               LogDebug("msg->getMessageStatus()=" << msg->getMessageStatus());
-               LogInfo("id.size() : " << id.size());
+               LoggerD("msg->getMessageStatus()=" << msg->getMessageStatus());
+               LoggerI("id.size() : " << id.size());
                if((id.size() == 0) && msg->getMessageStatus() == MESSAGE_STATUS_CREATED)
                {
-                       LogInfo("JSValueMakeNull");
+                       LoggerI("JSValueMakeNull");
                        return JSValueMakeNull(context);
                }
                return converter->toJSValueRef(dateTime);
@@ -1045,11 +1045,11 @@ JSValueRef JSMessage::getTime(JSContextRef context,
         /* Currently this exception will not be caught here as converter
          * is using od-style, DPL exceptions. This catch sections
          * is prepared for future converter refactoring */
-        LogError("Getting message time failure: " << bex.getMessage());
+        LoggerE("Getting message time failure: " << bex.getMessage());
         return JSValueMakeUndefined(context);
     }
     catch(...) {
-        LogError("UnknownError when getting message time.");
+        LoggerE("UnknownError when getting message time.");
         return JSValueMakeUndefined(context);
     }
 }
@@ -1066,8 +1066,8 @@ JSValueRef JSMessage::getFolder(JSContextRef context,
 
                int tmpInt = msg->getMessageStatus();
 
-               LogError("folder : " << folder);
-               LogError("msg->getMessageStatus() : " << tmpInt);
+               LoggerE("folder : " << folder);
+               LoggerE("msg->getMessageStatus() : " << tmpInt);
 
                if(tmpInt == MESSAGE_STATUS_CREATED)
                {
@@ -1081,11 +1081,11 @@ JSValueRef JSMessage::getFolder(JSContextRef context,
         /* Currently this exception will not be caught here as converter
          * is using od-style, DPL exceptions. This catch sections
          * is prepared for future converter refactoring */
-        LogError("Getting message folder failure: " << bex.getMessage());
+        LoggerE("Getting message folder failure: " << bex.getMessage());
         return JSValueMakeUndefined(context);
     }
     catch(...) {
-        LogError("UnknownError when getting message folder.");
+        LoggerE("UnknownError when getting message folder.");
         return JSValueMakeUndefined(context);
     }
 }
@@ -1095,12 +1095,12 @@ JSValueRef JSMessage::getMessageBody(JSContextRef context,
         JSStringRef propertyName,
         JSValueRef* exception)
 {
-       LogInfo("getMessageBody");
+       LoggerI("getMessageBody");
 
        try {
         GlobalContextManager *gcm = GlobalContextManager::getInstance();
         if(gcm == NULL) {
-            LogError("Failed to get GlobalContextManager");
+            LoggerE("Failed to get GlobalContextManager");
             throw DeviceAPI::Common::UnknownException("Unable to receive global context");
         }
                JSContextRef globalContext = gcm->getGlobalContext(context);
@@ -1111,11 +1111,11 @@ JSValueRef JSMessage::getMessageBody(JSContextRef context,
                return JSMessageBody::createJS(globalContext, msg);
        }
     catch(BasePlatformException &bex) {
-        LogError("Getting message body failure: " << bex.getMessage());
+        LoggerE("Getting message body failure: " << bex.getMessage());
         return JSValueMakeUndefined(context);
     }
     catch(...) {
-        LogError("UnknownError when getting message body.");
+        LoggerE("UnknownError when getting message body.");
         return JSValueMakeUndefined(context);
     }
 }
@@ -1125,12 +1125,12 @@ JSValueRef JSMessage::getAccountID(JSContextRef context,
         JSStringRef propertyName,
         JSValueRef* exception)
 {
-       LogInfo("getAccountID");
+       LoggerI("getAccountID");
 
     try {
         GlobalContextManager *gcm = GlobalContextManager::getInstance();
         if(gcm == NULL) {
-            LogError("Failed to get GlobalContextManager");
+            LoggerE("Failed to get GlobalContextManager");
             throw DeviceAPI::Common::UnknownException("Unable to receive global context");
         }
         JSContextRef globalContext = gcm->getGlobalContext(context);
@@ -1139,7 +1139,7 @@ JSValueRef JSMessage::getAccountID(JSContextRef context,
 
                IMessagePtr msg = converter->toIMessage(object);        //get message point
 
-               LogInfo("create JS");
+               LoggerI("create JS");
                //getAccountID
                if (msg->getMessageType() == EMAIL)
                {
@@ -1182,11 +1182,11 @@ JSValueRef JSMessage::getAccountID(JSContextRef context,
                }
        }
     catch(BasePlatformException &bex) {
-        LogError("Getting account id failure: " << bex.getMessage());
+        LoggerE("Getting account id failure: " << bex.getMessage());
         return JSValueMakeUndefined(context);
     }
     catch(...) {
-        LogError("UnknownError when getting account id.");
+        LoggerE("UnknownError when getting account id.");
         return JSValueMakeUndefined(context);
     }
 }
@@ -1196,12 +1196,12 @@ JSValueRef JSMessage::getUID(JSContextRef context,
                        JSStringRef propertyName,
                        JSValueRef* exception)
 {
-       LogInfo("getUID");
+       LoggerI("getUID");
 
     try {
         GlobalContextManager *gcm = GlobalContextManager::getInstance();
         if(gcm == NULL) {
-            LogError("Failed to get GlobalContextManager");
+            LoggerE("Failed to get GlobalContextManager");
             throw DeviceAPI::Common::UnknownException("Unable to receive global context");
         }
         JSContextRef globalContext = gcm->getGlobalContext(context);
@@ -1210,7 +1210,7 @@ JSValueRef JSMessage::getUID(JSContextRef context,
 
                IMessagePtr msg = converter->toIMessage(object); //get message point
 
-               LogInfo("create JS");
+               LoggerI("create JS");
                //getAccountID
                if (msg->getMessageType() == EMAIL)
                {
@@ -1223,11 +1223,11 @@ JSValueRef JSMessage::getUID(JSContextRef context,
                }
        }
     catch(BasePlatformException &bex) {
-        LogError("Getting account id failure: " << bex.getMessage());
+        LoggerE("Getting account id failure: " << bex.getMessage());
         return JSValueMakeUndefined(context);
     }
     catch(...) {
-        LogError("UnknownError when getting account id.");
+        LoggerE("UnknownError when getting account id.");
         return JSValueMakeUndefined(context);
     }
 }
@@ -1238,7 +1238,7 @@ bool JSMessage::setAttachments(JSContextRef context,
         JSValueRef value,
         JSValueRef* exception)
 {
-       LogInfo("enter");
+       LoggerI("enter");
 
     try {
         ConverterMessageFactory::ConverterType converter = ConverterMessageFactory::getConverter(context);
@@ -1247,39 +1247,39 @@ bool JSMessage::setAttachments(JSContextRef context,
                if (JSIsArrayValue(context, value)) {
                        JSObjectRef valueObj = converter->toJSObjectRef(value);
                        unsigned int len = JSGetArrayLength(context, valueObj);
-                       LogDebug("Array Length = " << len);
+                       LoggerD("Array Length = " << len);
                        for (unsigned int i = 0; i < len; ++i)
                        {
                                JSValueRef att = JSObjectGetPropertyAtIndex(context, valueObj, i, NULL);
                                if (JSValueIsUndefined(context, att) || JSValueIsNull(context, att)) {
-                                       LogWarning("Invalid array element. Skipping.");
+                                       LoggerW("Invalid array element. Skipping.");
                                        continue;
                                }
                                IAttachmentPtr attachment = converter->toIAttachment(att);
 
                                if(attachment->getIsValidAttachment() == false)
                                {
-                    LogDebug("invalid attachment : " << i);
+                    LoggerD("invalid attachment : " << i);
                     throw DeviceAPI::Common::InvalidValuesException("Invalid attachment in array");
                                }
 
-                               LogDebug("Adding attachment , shotname: " << attachment->getShortName());
+                               LoggerD("Adding attachment , shotname: " << attachment->getShortName());
                                attachments.push_back(attachment);
                        }
                }
                else
                {
                        IAttachmentPtr attachment = converter->toIAttachment(value);
-                       LogDebug("Adding attachment , shotname: " << attachment->getShortName());
+                       LoggerD("Adding attachment , shotname: " << attachment->getShortName());
                        if(attachment->getIsValidAttachment() == false)
                        {
-                               LogDebug("invalid attachment");
+                               LoggerD("invalid attachment");
                                throw DeviceAPI::Common::InvalidValuesException("Invalid attachments array");
                        }
                        attachments.push_back(attachment);
                }
 
-               LogDebug("Attachment Size =" << attachments.size());
+               LoggerD("Attachment Size =" << attachments.size());
                if ( attachments.size() > 0)
                {
                        IMessagePtr msg = converter->toIMessage(object);
@@ -1300,7 +1300,7 @@ bool JSMessage::setAttachments(JSContextRef context,
                                                break;
                                        }
                                        default:
-                        LogError("not supported message type");
+                        LoggerE("not supported message type");
                         throw DeviceAPI::Common::NotSupportedException("Unsupported message type");
                         break;
                                }
@@ -1308,17 +1308,17 @@ bool JSMessage::setAttachments(JSContextRef context,
                        }
                        else
                        {
-                               LogError("Message converter failed...");
+                               LoggerE("Message converter failed...");
                                throw DeviceAPI::Common::UnknownException("Message conversion failure");
                        }
                }
        }
     catch(BasePlatformException &bex) {
-        LogError("Setting attachments failed: " << bex.getMessage());
+        LoggerE("Setting attachments failed: " << bex.getMessage());
         return true;
     }
     catch(...) {
-        LogError("UnknownError when setting attachments.");
+        LoggerE("UnknownError when setting attachments.");
         return true;
     }
     return true;
@@ -1332,7 +1332,7 @@ bool JSMessage::setAttachments(JSContextRef context,
         JSValueRef value,
         JSValueRef* exception)
 {
-    LogInfo("enter");
+    LoggerI("enter");
 
     Try
     {
@@ -1345,7 +1345,7 @@ bool JSMessage::setAttachments(JSContextRef context,
         }
     }
     Catch(WrtDeviceApis::Commons::NullPointerException) {
-        LogError("Error on pointer, null value");
+        LoggerE("Error on pointer, null value");
           return JSTizenExceptionFactory::postException(context, exception,
                           JSTizenException::UNKNOWN_ERROR, JSMESSAGING_EXCEPTION_MSG_UNKNOWN);
     }
@@ -1364,17 +1364,17 @@ bool JSMessage::setAttachments(JSContextRef context,
                 JSValueRef att = JSGetArrayElement(context, valueObj, i);
                 if (JSValueIsUndefined(context,
                                        att) || JSValueIsNull(context, att)) {
-                    LogWarning("Invalid array element. Skipping.");
+                    LoggerW("Invalid array element. Skipping.");
                     continue;
                 }
                 DeviceAPI::Filesystem::INodePtr node = converter->toFilesystemNode(
                         att);
 
-                LogDebug("Adding attachment: " << node->getPath()->getFullPath());
+                LoggerD("Adding attachment: " << node->getPath()->getFullPath());
                 attachments.push_back(node->getPath()->getFullPath());
             }
         } else {
-            LogWarning("Invalid or null element passed as attachment array." <<
+            LoggerW("Invalid or null element passed as attachment array." <<
                        "Setting empty vector.");
         }
 
@@ -1399,23 +1399,23 @@ bool JSMessage::setAttachments(JSContextRef context,
             return false; // ignore
 
         default:
-            LogError("not supported message type");
+            LoggerE("not supported message type");
             Throw(WrtDeviceApis::Commons::InvalidArgumentException);
         }
         return true;
     }
     Catch(WrtDeviceApis::Commons::ConversionException) {
-        LogError("Error on conversion");
+        LoggerE("Error on conversion");
          return JSTizenExceptionFactory::postException(context, exception,
                   JSTizenException::TYPE_MISMATCH_ERROR, JSMESSAGING_EXCEPTION_MSG_INVALID_ARGUMENT);
     }
     Catch(WrtDeviceApis::Commons::NullPointerException) {
-        LogError("Error on pointer, null value");
+        LoggerE("Error on pointer, null value");
          return JSTizenExceptionFactory::postException(context, exception,
                         JSTizenException::UNKNOWN_ERROR, JSMESSAGING_EXCEPTION_MSG_UNKNOWN);
     }
     Catch(WrtDeviceApis::Commons::InvalidArgumentException) {
-        LogError("Invalid argument");
+        LoggerE("Invalid argument");
           return JSTizenExceptionFactory::postException(context, exception,
                           JSTizenException::INVALID_VALUES_ERROR, JSMESSAGING_EXCEPTION_MSG_INVALID_ARGUMENT);
     }
@@ -1433,7 +1433,7 @@ bool JSMessage::setBccAddress(JSContextRef context,
                ConverterMessageFactory::ConverterType converter = ConverterMessageFactory::getConverter(context);
                IMessagePtr msg = converter->toIMessage(object);
                Recipients bcc = converter->toRecipients(value);
-               LogDebug("setting bcc field, size=" << bcc.getRecipientSize());
+               LoggerD("setting bcc field, size=" << bcc.getRecipientSize());
 
                MessageType msgType = msg->getMessageType();
                switch (msgType) {
@@ -1448,18 +1448,18 @@ bool JSMessage::setBccAddress(JSContextRef context,
                                break;
                        }
                        default:
-                LogError("not supported message type");
+                LoggerE("not supported message type");
                 throw DeviceAPI::Common::NotSupportedException("Unsupported message type");
                 break;
                }
                return true;
        }
     catch(BasePlatformException &bex) {
-        LogError("Setting BCC addresses failed: " << bex.getMessage());
+        LoggerE("Setting BCC addresses failed: " << bex.getMessage());
         return true;
     }
     catch(...) {
-        LogError("UnknownError when setting BCC addresses.");
+        LoggerE("UnknownError when setting BCC addresses.");
         return true;
     }
     return true;
@@ -1482,11 +1482,11 @@ bool JSMessage::setBody(JSContextRef context,
         /* Currently this exception will not be caught here as converter
          * is using od-style, DPL exceptions. This catch sections
          * is prepared for future converter refactoring */
-        LogError("Setting BCC addresses failed: " << bex.getMessage());
+        LoggerE("Setting BCC addresses failed: " << bex.getMessage());
         return true;
     }
     catch(...) {
-        LogError("UnknownError when setting BCC addresses.");
+        LoggerE("UnknownError when setting BCC addresses.");
         return true;
     }
        return true;
@@ -1502,7 +1502,7 @@ bool JSMessage::setCcAddress(JSContextRef context,
                ConverterMessageFactory::ConverterType converter = ConverterMessageFactory::getConverter(context);
                IMessagePtr msg = converter->toIMessage(object);
                Recipients cc = converter->toRecipients(value);
-               LogDebug("setting cc field, size=" << cc.getRecipientSize());
+               LoggerD("setting cc field, size=" << cc.getRecipientSize());
 
                MessageType msgType = msg->getMessageType();
                switch (msgType) {
@@ -1516,18 +1516,18 @@ bool JSMessage::setCcAddress(JSContextRef context,
                                break;
                        }
                        default:
-                LogError("unsuported message type");
+                LoggerE("unsuported message type");
                 throw DeviceAPI::Common::NotSupportedException("Unsupported message type");
                 break;
         }
         return true;
        }
     catch(BasePlatformException &bex) {
-        LogError("Setting CC addresses failed: " << bex.getMessage());
+        LoggerE("Setting CC addresses failed: " << bex.getMessage());
         return true;
     }
     catch(...) {
-        LogError("UnknownError when setting CC addresses.");
+        LoggerE("UnknownError when setting CC addresses.");
         return true;
     }
        return true;
@@ -1539,13 +1539,13 @@ bool JSMessage::setDestinationAddress(JSContextRef context,
         JSValueRef value,
         JSValueRef * exception)
 {
-       LogInfo("enter");
+       LoggerI("enter");
        try
        {
                ConverterMessageFactory::ConverterType converter = ConverterMessageFactory::getConverter(context);
                IMessagePtr msg = converter->toIMessage(object);
                Recipients to = converter->toRecipients(value);
-               LogDebug("setting to field, size=" << to.getRecipientSize());
+               LoggerD("setting to field, size=" << to.getRecipientSize());
                msg->setToRecipients(to);
                return true;
        }
@@ -1553,11 +1553,11 @@ bool JSMessage::setDestinationAddress(JSContextRef context,
         /* Currently this exception will not be caught here as converter
          * is using od-style, DPL exceptions. This catch sections
          * is prepared for future converter refactoring */
-        LogError("Setting destination addresses failed: " << bex.getMessage());
+        LoggerE("Setting destination addresses failed: " << bex.getMessage());
         return true;
     }
     catch(...) {
-        LogError("UnknownError when setting destination addresses.");
+        LoggerE("UnknownError when setting destination addresses.");
         return true;
     }
     return true;
@@ -1580,11 +1580,11 @@ bool JSMessage::setIsRead(JSContextRef context,
         /* Currently this exception will not be caught here as converter
          * is using od-style, DPL exceptions. This catch sections
          * is prepared for future converter refactoring */
-        LogError("Setting destination addresses failed: " << bex.getMessage());
+        LoggerE("Setting destination addresses failed: " << bex.getMessage());
         return true;
     }
     catch(...) {
-        LogError("UnknownError when setting destination addresses.");
+        LoggerE("UnknownError when setting destination addresses.");
         return true;
     }
     return true;
@@ -1611,18 +1611,18 @@ bool JSMessage::setMessagePriority(JSContextRef context,
                 break;
 
                        default:
-                LogError("unsuported message type");
+                LoggerE("unsuported message type");
                 throw DeviceAPI::Common::NotSupportedException("Unsupported message type");
                 break;
                }
                return true;
        }
     catch(BasePlatformException &bex) {
-        LogError("Setting message priority failed: " << bex.getMessage());
+        LoggerE("Setting message priority failed: " << bex.getMessage());
         return true;
     }
     catch(...) {
-        LogError("UnknownError when setting message priority.");
+        LoggerE("UnknownError when setting message priority.");
         return true;
     }
     return true;
@@ -1656,18 +1656,18 @@ bool JSMessage::setSubject(JSContextRef context,
                                return true;   // ignore
 
                        default:
-                               LogError("message not supported");
+                               LoggerE("message not supported");
                 throw DeviceAPI::Common::NotSupportedException("Unsupported message type");
                 break;
                }
                return true;
        }
     catch(BasePlatformException &bex) {
-        LogError("Setting message priority failed: " << bex.getMessage());
+        LoggerE("Setting message priority failed: " << bex.getMessage());
         return true;
     }
     catch(...) {
-        LogError("UnknownError when setting message priority.");
+        LoggerE("UnknownError when setting message priority.");
         return true;
     }
     return true;
@@ -1687,15 +1687,15 @@ JSValueRef JSMessage::getConversationId(JSContextRef context,
         JSStringRef propertyName,
         JSValueRef* exception)
 {
-       LogDebug("getConversationId");
+       LoggerD("getConversationId");
 
        try {
                ConverterMessageFactory::ConverterType converter = ConverterMessageFactory::getConverter(context);
                int convId = 0;
                IMessagePtr msg = converter->toIMessage(object);
 
-               LogDebug("msg->getMessageStatus()=" << msg->getMessageStatus());
-               LogDebug("msg.getConvId()=" << msg->getConvId());
+               LoggerD("msg->getMessageStatus()=" << msg->getMessageStatus());
+               LoggerD("msg.getConvId()=" << msg->getConvId());
                convId = msg->getConvId();
                if((msg->getConvId() == -1) && msg->getMessageStatus() == MESSAGE_STATUS_CREATED)
                {
@@ -1707,11 +1707,11 @@ JSValueRef JSMessage::getConversationId(JSContextRef context,
         /* Currently this exception will not be caught here as converter
          * is using od-style, DPL exceptions. This catch sections
          * is prepared for future converter refactoring */
-        LogError("Getting conversation id failure: " << bex.getMessage());
+        LoggerE("Getting conversation id failure: " << bex.getMessage());
         return JSValueMakeUndefined(context);
     }
     catch(...) {
-        LogError("UnknownError when getting conversation id.");
+        LoggerE("UnknownError when getting conversation id.");
         return JSValueMakeUndefined(context);
     }
 }
@@ -1721,7 +1721,7 @@ JSValueRef JSMessage::getInResponseTo(JSContextRef context,
                JSStringRef propertyName,
                JSValueRef* exception)
 {
-       LogDebug("getInResponseTo");
+       LoggerD("getInResponseTo");
 
     try {
                ConverterMessageFactory::ConverterType converter = ConverterMessageFactory::getConverter(context);
@@ -1731,19 +1731,19 @@ JSValueRef JSMessage::getInResponseTo(JSContextRef context,
 
                if (msg->getMessageType() != EMAIL)
                {
-                       LogDebug("not EMAIL type return empty string");
+                       LoggerD("not EMAIL type return empty string");
                        return converter->toJSValueRef("");
                }
 
                IEmailPtr email = MessageFactory::convertToEmail(msg);
                msgId = email->getUID();
 
-               LogDebug("msg.getConvId()=" << msg->getConvId());
+               LoggerD("msg.getConvId()=" << msg->getConvId());
                convId = msg->getConvId();
 
                if (convId == msgId)
                {
-                       LogDebug("Not forwared and replied, return empty string");
+                       LoggerD("Not forwared and replied, return empty string");
                        return converter->toJSValueRef("");
                }
 
@@ -1753,11 +1753,11 @@ JSValueRef JSMessage::getInResponseTo(JSContextRef context,
         /* Currently this exception will not be caught here as converter
          * is using od-style, DPL exceptions. This catch sections
          * is prepared for future converter refactoring */
-        LogError("Getting in response to failure: " << bex.getMessage());
+        LoggerE("Getting in response to failure: " << bex.getMessage());
         return JSValueMakeUndefined(context);
     }
     catch(...) {
-        LogError("UnknownError when getting in response to.");
+        LoggerE("UnknownError when getting in response to.");
         return JSValueMakeUndefined(context);
     }
 }
@@ -1767,7 +1767,7 @@ JSValueRef JSMessage::getMessageStatus(JSContextRef context,
                        JSStringRef propertyName,
                        JSValueRef* exception)
 {
-       LogInfo("getMessageStatus");
+       LoggerI("getMessageStatus");
 
        try
        {
@@ -1775,18 +1775,18 @@ JSValueRef JSMessage::getMessageStatus(JSContextRef context,
 
                IMessagePtr msg = converter->toIMessage(object); //get message point
 
-               LogInfo("create JS");
+               LoggerI("create JS");
                return converter->toJSValueRef(converter->toMessageStatusType(msg->getMessageStatus()));
        }
     catch(BasePlatformException &bex) {
         /* Currently this exception will not be caught here as converter
          * is using od-style, DPL exceptions. This catch sections
          * is prepared for future converter refactoring */
-        LogError("Getting message status failure: " << bex.getMessage());
+        LoggerE("Getting message status failure: " << bex.getMessage());
         return JSValueMakeUndefined(context);
     }
     catch(...) {
-        LogError("UnknownError when getting message status.");
+        LoggerE("UnknownError when getting message status.");
         return JSValueMakeUndefined(context);
     }
 }
@@ -1797,7 +1797,7 @@ JSValueRef JSMessage::hasAttachment(JSContextRef context,
                        JSStringRef propertyName,
                        JSValueRef* exception)
 {
-       LogInfo("hasAttachment");
+       LoggerI("hasAttachment");
 
        Try {
         ConverterMessageFactory::ConverterType converter = ConverterMessageFactory::getConverter(context);
@@ -1830,11 +1830,11 @@ JSValueRef JSMessage::hasAttachment(JSContextRef context,
         /* Currently this exception will not be caught here as converter
          * is using od-style, DPL exceptions. This catch sections
          * is prepared for future converter refactoring */
-        LogError("Getting hasAttachment flag failure: " << bex.getMessage());
+        LoggerE("Getting hasAttachment flag failure: " << bex.getMessage());
         return JSValueMakeUndefined(context);
     }
     catch(...) {
-        LogError("UnknownError when getting hasAttachment flag.");
+        LoggerE("UnknownError when getting hasAttachment flag.");
         return JSValueMakeUndefined(context);
     }
 }