wrt-plugins-tizen_0.4.23
[framework/web/wrt-plugins-tizen.git] / src / Notification / StatusNotification.cpp
index 1087157..bcfab33 100755 (executable)
@@ -35,34 +35,34 @@ extern "C" int service_to_bundle(service_h service, bundle **data);
 //callback functions.
 static bool service_extra_data_cb(service_h service, const char *key, void *user_data)
 {
-       LogInfo("OK");
+       LoggerI("OK");
        char **value = NULL;
        int length = 0;
 
        if (user_data != NULL && key != NULL)
        {       
-               LogInfo("user data & key is existed");
+               LoggerI("user data & key is existed");
 
                DeviceAPI::Application::ApplicationControlPtr* appControl = 
                        (DeviceAPI::Application::ApplicationControlPtr*)(user_data);
 
                DeviceAPI::Application::ApplicationControlDataPtr data(new DeviceAPI::Application::ApplicationControlData());
-               LogInfo("key = " << key);
+               LoggerI("key = " << key);
                std::string keyStr = key;
                std::vector<std::string> keyValue;
                int index = 0;
 
                if (service_get_extra_data_array((*appControl)->getService_h(), key, &value, &length) == SERVICE_ERROR_NONE)
                {
-                       LogInfo("extra_data_array length = " << length);
+                       LoggerI("extra_data_array length = " << length);
                        
                        if (value != NULL && length != 0)
                        {
-                               LogInfo("extra_data_length = " << length);
+                               LoggerI("extra_data_length = " << length);
                                data->setKey(key);
                                for (index = 0; index < length; index++)
                                {
-                                       LogInfo("Value=" << value[index]);
+                                       LoggerI("Value=" << value[index]);
                                        keyValue.push_back(value[index]);
                                }
                                
@@ -77,21 +77,23 @@ static bool service_extra_data_cb(service_h service, const char *key, void *user
        return true;
 }
 
+#if 0
 static bool service_extra_data_delete_cb(service_h service, const char *key, void *user_data)
 {
-       LogInfo("OK");
+       LoggerI("OK");
        if (key != NULL)
        {       
-               LogInfo("del key = " << key);
+               LoggerI("del key = " << key);
                
                if (service_remove_extra_data(service, key) != SERVICE_ERROR_NONE)
                {
-                       LogWarning("remove extra data failed");
+                       LoggerW("remove extra data failed");
                        return false;
                }
        }
        return true;
 }
+#endif
 
 StatusNotification::StatusNotification(NotificationType statusType) :
        m_notiType(NOTI_TYPE_NONE),
@@ -101,7 +103,7 @@ StatusNotification::StatusNotification(NotificationType statusType) :
        m_notiUpdated(false),
        m_launchFlag(false)
 {
-       LogInfo("statusType =" << statusType);
+       LoggerI("statusType =" << statusType);
 
        notification_type_e type = NOTIFICATION_TYPE_NONE;
        setNotiType(statusType);
@@ -116,23 +118,23 @@ StatusNotification::StatusNotification(NotificationType statusType) :
        }
        else
        {
-               LogInfo(" invalide noti type");
+               LoggerI(" invalide noti type");
                throw TypeMismatchException("value is not notification type");
        }
 
        setProgressType(NOTI_PROGRESS_TYPE_PERCENTAGE); //default
 
-       LogInfo("Notification Type : " << type);
+       LoggerI("Notification Type : " << type);
 
        notification_h noti = notification_create(type);        //create notificatin.
        if ( noti )
        {
-               LogInfo("noti =" << noti);
+               LoggerI("noti =" << noti);
                setNotificationHandle((void*)noti);
 
                if (NOTIFICATION_TYPE_ONGOING ==  type)
                {       //ongoing no ticker.
-                       LogInfo("ongoing type");
+                       LoggerI("ongoing type");
                        notification_set_display_applist(noti, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY |NOTIFICATION_DISPLAY_APP_INDICATOR );
                }
        }
@@ -154,7 +156,7 @@ StatusNotification::StatusNotification(void* noti) :
        m_notiUpdated(false),
        m_launchFlag(false)
 {
-       LogInfo("noti : " << noti);
+       LoggerI("noti : " << noti);
        
        notification_h notification = (notification_h)noti;
 
@@ -192,7 +194,7 @@ StatusNotification::StatusNotification(void* noti) :
                        }
                }
 
-               LogInfo(" notification type  =" << type);
+               LoggerI(" notification type  =" << type);
                setNotiType(type);
                setProgressType(NOTI_PROGRESS_TYPE_PERCENTAGE); //default.
                
@@ -209,17 +211,17 @@ StatusNotification::StatusNotification(void* noti) :
                bundle *bSvc = NULL;
 
                int ret =  notification_get_execute_option(notification, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, &bSvc);
-               LogInfo("ret = " << ret); 
+               LoggerI("ret = " << ret); 
                if (ret == NOTIFICATION_ERROR_NONE)
                {
-                       LogInfo(" bundle = " << bSvc);
+                       LoggerI(" bundle = " << bSvc);
                        if (bSvc)
                        {
-                               LogInfo("bundle is valid");     
+                               LoggerI("bundle is valid");     
                                int ret = service_create_event(bSvc, &m_service);
                                if (ret != SERVICE_ERROR_NONE)
                                {
-                                       LogInfo("Service Create Event Error");
+                                       LoggerI("Service Create Event Error");
                                        throw UnknownException("can't make service object");
                                }
                        }
@@ -246,10 +248,10 @@ StatusNotification::StatusNotification(int privID) :
        m_notiUpdated(false),
        m_launchFlag(false)
 {
-       LogInfo("priv ID : " << privID);
+       LoggerI("priv ID : " << privID);
 
        notification_h notification = notification_load( NULL, privID); //load notification.
-       LogInfo(" notification " << notification);
+       LoggerI(" notification " << notification);
 
        if ( notification )
        {
@@ -284,7 +286,7 @@ StatusNotification::StatusNotification(int privID) :
                        }
                }
 
-               LogInfo(" notification type  =" << type);
+               LoggerI(" notification type  =" << type);
                setNotiType(type);
                setProgressType(NOTI_PROGRESS_TYPE_PERCENTAGE); //default.      
                setNotificationHandle((void*)notification);
@@ -300,17 +302,17 @@ StatusNotification::StatusNotification(int privID) :
                bundle *bSvc = NULL;
 
                int ret =  notification_get_execute_option(notification, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, &bSvc);
-               LogInfo("ret = " << ret); 
+               LoggerI("ret = " << ret); 
                if (ret == NOTIFICATION_ERROR_NONE)
                {
-                       LogInfo(" bundle = " << bSvc);
+                       LoggerI(" bundle = " << bSvc);
                        if (bSvc)
                        {
-                               LogInfo("bundle is valid");     
+                               LoggerI("bundle is valid");     
                                int ret = service_create_event(bSvc, &m_service);
                                if (ret != SERVICE_ERROR_NONE)
                                {
-                                       LogInfo("Service Create Event Error");
+                                       LoggerI("Service Create Event Error");
                                        throw UnknownException("can't make service object");
                                }
                        }
@@ -331,7 +333,7 @@ StatusNotification::StatusNotification(int privID) :
 
 StatusNotification::~StatusNotification() 
 {
-       LogInfo(" notification = " << m_notiHandle);
+       LoggerI(" notification = " << m_notiHandle);
 
        //clear thumbnail.
        //clearDetailInfos();
@@ -339,7 +341,7 @@ StatusNotification::~StatusNotification()
        if (m_notiHandle)
        {
 #if 0
-               LogInfo(" service = " << m_service);
+               LoggerI(" service = " << m_service);
                if (m_service != NULL)
                {
                        service_destroy(m_service);
@@ -395,7 +397,7 @@ std::string StatusNotification::getStatusType()
 
 void StatusNotification::setStatusType(std::string type)
 {
-       LogInfo("type = " << type);
+       LoggerI("type = " << type);
        
        NotificationType notiType = NOTI_TYPE_NONE; 
        
@@ -410,13 +412,13 @@ void StatusNotification::setStatusType(std::string type)
        else
        throw InvalidValuesException("Invalid Status Type.");
 
-       LogInfo("Notification type = " << notiType);
+       LoggerI("Notification type = " << notiType);
        setNotiType(notiType);
 }
 
 time_t StatusNotification::getPostedTime()
 {
-       LogInfo("get m_notiHandle = " << m_notiHandle);
+       LoggerI("get m_notiHandle = " << m_notiHandle);
        
        time_t postedTime = 0;
        
@@ -428,7 +430,7 @@ time_t StatusNotification::getPostedTime()
                }
        }
        
-       LogInfo("posted Time =" << ctime(&postedTime));
+       LoggerI("posted Time =" << ctime(&postedTime));
        return postedTime;
 }
 
@@ -454,10 +456,10 @@ std::string StatusNotification::getTitle()
 
 void StatusNotification::setTitle(std::string title)
 {
-       LogInfo("Title : " << title);
+       LoggerI("Title : " << title);
        if (m_notiHandle)
        {
-               LogInfo("get Title : " << getTitle());
+               LoggerI("get Title : " << getTitle());
                if((getTitle()).compare(title)) //different value.
                {
                        if (notification_set_text(m_notiHandle, NOTIFICATION_TEXT_TYPE_TITLE, title.c_str(), 
@@ -470,12 +472,12 @@ void StatusNotification::setTitle(std::string title)
                }
                else
                {
-                       LogInfo(" title = " << title << " getTitle = " << getTitle());
+                       LoggerI(" title = " << title << " getTitle = " << getTitle());
                }
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 }
@@ -483,7 +485,7 @@ void StatusNotification::setTitle(std::string title)
 
 std::string StatusNotification::getContent()
 {
-       LogInfo("get Content handle: " << m_notiHandle);
+       LoggerI("get Content handle: " << m_notiHandle);
        if (m_notiHandle)
        {
                char *content = NULL;
@@ -493,7 +495,7 @@ std::string StatusNotification::getContent()
                        throw UnknownException("get notification Content error");
                }
                
-               LogInfo(" get Content : " << content);
+               LoggerI(" get Content : " << content);
 
                std::string notiContent;
                
@@ -512,7 +514,7 @@ std::string StatusNotification::getContent()
 
 char* StatusNotification::getStrContent()
 {
-       LogInfo("get Content handle: " << m_notiHandle);
+       LoggerI("get Content handle: " << m_notiHandle);
        if (m_notiHandle)
        {
                char *content = NULL;
@@ -532,7 +534,7 @@ char* StatusNotification::getStrContent()
 
 void StatusNotification::setContent(std::string content)
 {
-       LogInfo("Content : " << content);
+       LoggerI("Content : " << content);
        if (m_notiHandle)
        {
                if((getContent()).compare(content))     //different value.
@@ -547,7 +549,7 @@ void StatusNotification::setContent(std::string content)
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 }
@@ -555,7 +557,7 @@ void StatusNotification::setContent(std::string content)
 std::string StatusNotification::getIconPath()
 {
 
-       LogInfo("m_notiHandle = " << m_notiHandle);
+       LoggerI("m_notiHandle = " << m_notiHandle);
        if (m_notiHandle)
        {
                char *iconPath = NULL;
@@ -565,7 +567,7 @@ std::string StatusNotification::getIconPath()
                }
 
                std::string notiIconPath(iconPath);
-               LogInfo("icon Path = " << iconPath);
+               LoggerI("icon Path = " << iconPath);
                
                //if icon path invalid, return empty string.
                if ( notiIconPath.find(DEFAULT_ICON_PATH,0) == std::string::npos)
@@ -585,7 +587,7 @@ void StatusNotification::setIconPath(const std::string& iconPath)
 {
        if (m_notiHandle)
        {
-               LogInfo("icon path = " << iconPath << " origin icon path = " << getIconPath());
+               LoggerI("icon path = " << iconPath << " origin icon path = " << getIconPath());
                if( getIconPath().compare(iconPath))
                {
                        if (notification_set_image(m_notiHandle,NOTIFICATION_IMAGE_TYPE_ICON, iconPath.c_str()) != NOTIFICATION_ERROR_NONE)
@@ -597,14 +599,14 @@ void StatusNotification::setIconPath(const std::string& iconPath)
        }
        else
        {
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 }
 
 std::string StatusNotification::getSoundPath()
 {
-       LogInfo("Handle = " << m_notiHandle);
+       LoggerI("Handle = " << m_notiHandle);
 
        if (m_notiHandle)
        {
@@ -616,10 +618,10 @@ std::string StatusNotification::getSoundPath()
                        throw UnknownException("get notification sound error");
                }
 
-               LogInfo(" sound type = " << type << " path = " << soundPath);
+               LoggerI(" sound type = " << type << " path = " << soundPath);
                if ( type == NOTIFICATION_SOUND_TYPE_USER_DATA )
                {
-                       LogInfo("soundPath = " << soundPath);
+                       LoggerI("soundPath = " << soundPath);
                        return std::string(soundPath); 
                }
                else
@@ -629,7 +631,7 @@ std::string StatusNotification::getSoundPath()
        }
        else
        {
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 }
@@ -638,7 +640,7 @@ void StatusNotification::setSoundPath(const std::string& sound)
 {
        if (m_notiHandle)
        {
-               LogInfo("sound path = " << sound << " origin sound path = " << getSoundPath());
+               LoggerI("sound path = " << sound << " origin sound path = " << getSoundPath());
                
                if( getSoundPath().compare(sound))
                {
@@ -651,10 +653,10 @@ void StatusNotification::setSoundPath(const std::string& sound)
 
                if (sound.empty()) 
                {
-                   LogInfo("sound path is NULL");
+                   LoggerI("sound path is NULL");
                    if ( NOTI_TYPE_ONGOING == getNotiType() || NOTI_TYPE_PROGRESS == getNotiType())
                    {
-                               LogInfo("Ongoing Type" );
+                               LoggerI("Ongoing Type" );
                                if (notification_set_sound(m_notiHandle,NOTIFICATION_SOUND_TYPE_NONE, NULL) != NOTIFICATION_ERROR_NONE)
                                {
                                        throw UnknownException("set notification sound error");
@@ -672,14 +674,14 @@ void StatusNotification::setSoundPath(const std::string& sound)
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 }
 
 bool StatusNotification::getDefaultVibration()
 {
-       LogInfo("getDefaultVibration");
+       LoggerI("getDefaultVibration");
        if (m_notiHandle)
        {
                notification_vibration_type_e vib_type;
@@ -699,7 +701,7 @@ bool StatusNotification::getDefaultVibration()
        }
        else
        {
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 
@@ -708,11 +710,11 @@ bool StatusNotification::getDefaultVibration()
 
 void StatusNotification::setDefaultVibration(const bool& vibration) 
 {
-    LogInfo("vibration = " << vibration);
+    LoggerI("vibration = " << vibration);
        if (m_notiHandle)
        {
                notification_vibration_type_e vib_type = NOTIFICATION_VIBRATION_TYPE_NONE;
-               LogInfo("old vibration = " << getDefaultVibration());
+               LoggerI("old vibration = " << getDefaultVibration());
                if (getDefaultVibration() != vibration)
                {
                        if (vibration)
@@ -723,7 +725,7 @@ void StatusNotification::setDefaultVibration(const bool& vibration)
                        {
                                vib_type = NOTIFICATION_VIBRATION_TYPE_NONE;
                        }
-                       LogInfo("type vibration type= " << vib_type);
+                       LoggerI("type vibration type= " << vib_type);
 
                        if (notification_set_vibration(m_notiHandle, vib_type , NULL) != NOTIFICATION_ERROR_NONE)
                        {
@@ -734,7 +736,7 @@ void StatusNotification::setDefaultVibration(const bool& vibration)
        }
        else
        {
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 
@@ -755,7 +757,7 @@ DeviceAPI::Application::ApplicationControlPtr StatusNotification::getApplication
                        // mandatory
                        if(service_get_operation(m_service, &tempStr) == SERVICE_ERROR_NONE)
                        {
-                               LogDebug("Operation Str = " << tempStr);
+                               LoggerD("Operation Str = " << tempStr);
                                if (tempStr) 
                                {
                                        appControl->setOperation(tempStr);
@@ -767,7 +769,7 @@ DeviceAPI::Application::ApplicationControlPtr StatusNotification::getApplication
                        // optional
                        if (service_get_mime(m_service, &tempStr) == SERVICE_ERROR_NONE)
                        {
-                               LogDebug("Mime Str = " << tempStr);
+                               LoggerD("Mime Str = " << tempStr);
                                if (tempStr) 
                                {
                                        appControl->setMime(tempStr);
@@ -779,7 +781,7 @@ DeviceAPI::Application::ApplicationControlPtr StatusNotification::getApplication
                        // optional
                        if (service_get_uri(m_service, &tempStr) == SERVICE_ERROR_NONE)
                        {
-                               LogDebug("Uri Str = " << tempStr);
+                               LoggerD("Uri Str = " << tempStr);
                                if (tempStr)
                                {
                                        appControl->setUri(tempStr);
@@ -790,7 +792,7 @@ DeviceAPI::Application::ApplicationControlPtr StatusNotification::getApplication
 
                        if (service_get_category(m_service, &tempStr) == SERVICE_ERROR_NONE)
                        {
-                               LogDebug("Category Str = " << tempStr);
+                               LoggerD("Category Str = " << tempStr);
                                if (tempStr)
                                {
                                        appControl->setCategory(tempStr);
@@ -823,7 +825,7 @@ DeviceAPI::Application::ApplicationControlPtr StatusNotification::getApplication
                        service = NULL;
                }
 
-               LogWarning(_rethrown_exception.GetMessage());
+               LoggerW(_rethrown_exception.GetMessage());
        }
        
     return appControl;
@@ -831,7 +833,7 @@ DeviceAPI::Application::ApplicationControlPtr StatusNotification::getApplication
 
 void StatusNotification::setApplicationControl(DeviceAPI::Application::ApplicationControlPtr control)
 {
-       LogInfo("Entered m_service : " << m_service << " control : " << control);
+       LoggerI("Entered m_service : " << m_service << " control : " << control);
 
        //delete old service.
        if (m_service)
@@ -846,7 +848,7 @@ void StatusNotification::setApplicationControl(DeviceAPI::Application::Applicati
        }
        else
        {
-               LogInfo("getOperation : " << control->getOperation().c_str());
+               LoggerI("getOperation : " << control->getOperation().c_str());
                if (control->getOperation().size() != 0)
                {
                        m_launchFlag = true;            //default attribute
@@ -857,7 +859,7 @@ void StatusNotification::setApplicationControl(DeviceAPI::Application::Applicati
                }
                        
                // optional
-               LogInfo("getUri : " << control->getUri().c_str());
+               LoggerI("getUri : " << control->getUri().c_str());
                if (control->getUri().size() != 0)
                {
                        if (service_set_uri(m_service, control->getUri().c_str() ) != SERVICE_ERROR_NONE)
@@ -867,7 +869,7 @@ void StatusNotification::setApplicationControl(DeviceAPI::Application::Applicati
                }
        
                // optional
-               LogInfo("getMime : " << control->getMime().c_str());
+               LoggerI("getMime : " << control->getMime().c_str());
                if (control->getMime().size() != 0)
                {
                        if (service_set_mime(m_service, control->getMime().c_str() ) != SERVICE_ERROR_NONE)
@@ -876,7 +878,7 @@ void StatusNotification::setApplicationControl(DeviceAPI::Application::Applicati
                        }
                }
        
-               LogInfo("Category : " << control->getCategory().c_str());
+               LoggerI("Category : " << control->getCategory().c_str());
                if (control->getCategory().size() != 0)
                {
                        if (service_set_category(m_service, control->getCategory().c_str() ) != SERVICE_ERROR_NONE)
@@ -884,17 +886,17 @@ void StatusNotification::setApplicationControl(DeviceAPI::Application::Applicati
                                throw UnknownException("service set mime error");
                        }
                }
-
+#if 0
                //remove key
-               //if ( service_foreach_extra_data(m_service, service_extra_data_delete_cb, NULL) != SERVICE_ERROR_NONE)
-               //{
-               //      throw UnknownException("get notification service uri error");
-               //}
-               
+               if ( service_foreach_extra_data(m_service, service_extra_data_delete_cb, NULL) != SERVICE_ERROR_NONE)
+               {
+                       throw UnknownException("get notification service uri error");
+               }
+#endif         
                std::vector<DeviceAPI::Application::ApplicationControlDataPtr> appControlDataArray = control->getAppControlDataArray();
                size_t index = 0;
        
-               LogInfo (" App Control Datas Count : " << appControlDataArray.size());
+               LoggerI (" App Control Datas Count : " << appControlDataArray.size());
        
                DeviceAPI::Application::ApplicationControlDataArray::iterator iter;
        
@@ -902,7 +904,7 @@ void StatusNotification::setApplicationControl(DeviceAPI::Application::Applicati
                {
                        DeviceAPI::Application::ApplicationControlDataPtr appControlData = *iter;
                        std::string key = appControlData->getKey();
-                       LogInfo(" key : " << key);
+                       LoggerI(" key : " << key);
                
                        if (key.empty())
                                continue;
@@ -913,11 +915,11 @@ void StatusNotification::setApplicationControl(DeviceAPI::Application::Applicati
                        for (size_t indexArray = 0; indexArray < value.size(); indexArray++)
                        {
                                arrayValue[indexArray] = (char*)value[indexArray].c_str();
-                               LogInfo( " value : " << arrayValue[indexArray]);
+                               LoggerI( " value : " << arrayValue[indexArray]);
                        }
        
                        const char* strKey = key.c_str();
-                       LogInfo( " value size: " << value.size());
+                       LoggerI( " value size: " << value.size());
                        if (service_add_extra_data_array(m_service, strKey, arrayValue, value.size()) != SERVICE_ERROR_NONE)
                        {
                                throw UnknownException("service set extra data error");                 
@@ -934,7 +936,7 @@ void StatusNotification::setApplicationControl(DeviceAPI::Application::Applicati
                        throw UnknownException("service get bundle");                   
                }
 
-               LogDebug("bundle_data : " << bundle_data);
+               LoggerD("bundle_data : " << bundle_data);
                
                if (bundle_data)
                {
@@ -948,12 +950,12 @@ void StatusNotification::setApplicationControl(DeviceAPI::Application::Applicati
 
 void StatusNotification::setApplicationId(const std::string& appId)
 {
-       LogInfo("m_service = "  << m_service << " appId = " << appId);
+       LoggerI("m_service = "  << m_service << " appId = " << appId);
        if (!m_service)
        {       
                if (service_create(&m_service) != SERVICE_ERROR_NONE)
                {
-                       LogWarning("Create Service Failed..");
+                       LoggerW("Create Service Failed..");
                        throw UnknownException("service creation error");
                }
        }
@@ -987,11 +989,11 @@ std::string StatusNotification::getApplicationId()
                {
                        if (retcode == SERVICE_ERROR_OUT_OF_MEMORY)
                        {
-                               LogWarning("SERVICE_ERROR_OUT_OF_MEMORY");
+                               LoggerW("SERVICE_ERROR_OUT_OF_MEMORY");
                        }
                        else
                        {
-                               LogWarning("UI_NOTIFICATION_ERROR_INVALID_PARAMETER");
+                               LoggerW("UI_NOTIFICATION_ERROR_INVALID_PARAMETER");
                        }
                        throw UnknownException ("get notification service error ");
                }
@@ -1017,7 +1019,7 @@ std::string StatusNotification::getApplicationId()
                        free(appIdStr);
                }
        }
-       LogInfo(retString);
+       LoggerI(retString);
        
        return retString;
 
@@ -1037,7 +1039,7 @@ double StatusNotification::getProgressValue()
                        {
                                throw UnknownException("get notification size error");
                        }
-                       LogInfo("Size Val = " << value);
+                       LoggerI("Size Val = " << value);
                }
                else if ( progressType == NOTI_PROGRESS_TYPE_PERCENTAGE )
                {
@@ -1045,7 +1047,7 @@ double StatusNotification::getProgressValue()
                        {
                                throw UnknownException("get notification percentage error");
                        }
-                       LogInfo("Percentage Val = " << value);
+                       LoggerI("Percentage Val = " << value);
                }
                else
                {
@@ -1054,9 +1056,9 @@ double StatusNotification::getProgressValue()
        }
        else
        {
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
        }
-       LogInfo("value = " << value);
+       LoggerI("value = " << value);
        return value;
        
 }
@@ -1066,10 +1068,10 @@ void StatusNotification::setProgressValue(const double &progressValue)
        if (m_notiHandle)
        {       
                NotificationProgressType progressType = getProgressType();
-               LogInfo("Progress Type : " << progressType);
+               LoggerI("Progress Type : " << progressType);
                
                double val = getProgressValue();
-               LogInfo("Progress value = " << progressValue << " origin Progress Value =" << val);
+               LoggerI("Progress value = " << progressValue << " origin Progress Value =" << val);
                
                if (progressType == NOTI_PROGRESS_TYPE_SIZE)
                {
@@ -1092,14 +1094,14 @@ void StatusNotification::setProgressValue(const double &progressValue)
        }
        else
        {
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException( "notification handle is null");
        }
 }
 
 std::string StatusNotification::getSubIconPath()
 {
-        LogInfo("Handle = " << m_notiHandle);
+        LoggerI("Handle = " << m_notiHandle);
        if (m_notiHandle)
        {
                char *subIconPath = NULL;
@@ -1125,7 +1127,7 @@ void StatusNotification::setSubIconPath(const std::string& subIconPath)
 {
        if (m_notiHandle)
        {
-               LogInfo(" subIconPath = " << subIconPath << " origin SubIconPath = " << getSubIconPath());      
+               LoggerI(" subIconPath = " << subIconPath << " origin SubIconPath = " << getSubIconPath());      
 
                if( getSubIconPath().compare(subIconPath))
                {
@@ -1138,7 +1140,7 @@ void StatusNotification::setSubIconPath(const std::string& subIconPath)
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 }
@@ -1173,13 +1175,13 @@ std::string StatusNotification::getInformation(int index)
                std::string strInfo;
                if (info)
                        strInfo = info;
-               LogDebug(" info " << strInfo);
+               LoggerD(" info " << strInfo);
                return strInfo;
 
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
        
@@ -1191,8 +1193,8 @@ void StatusNotification::setInformation( const std::string& info, int index)
        if (m_notiHandle)
        {
                int idx = index;
-               LogDebug(" index : " << idx);
-               LogDebug(" log : " << info);
+               LoggerD(" index : " << idx);
+               LoggerD(" log : " << info);
                notification_text_type_e type = NOTIFICATION_TEXT_TYPE_NONE; 
                
                switch (idx)
@@ -1225,7 +1227,7 @@ void StatusNotification::setInformation( const std::string& info, int index)
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 }
@@ -1261,13 +1263,13 @@ std::string StatusNotification::getSubInformation(int index)
                std::string strSubInfo;
                if (subInfo)
                        strSubInfo = subInfo;
-               LogDebug(" subInfo " << strSubInfo);
+               LoggerD(" subInfo " << strSubInfo);
                return strSubInfo;
                                
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException( "notification handle is null");
        }
        
@@ -1278,8 +1280,8 @@ void StatusNotification::setSubInformation( const std::string& subInfo, int inde
        if (m_notiHandle)
        {
                int idx = index;
-               LogDebug(" index : " << idx);
-               LogDebug(" log : " << subInfo);
+               LoggerD(" index : " << idx);
+               LoggerD(" log : " << subInfo);
                notification_text_type_e type = NOTIFICATION_TEXT_TYPE_NONE; 
                
                switch (idx)
@@ -1312,7 +1314,7 @@ void StatusNotification::setSubInformation( const std::string& subInfo, int inde
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException( "notification handle is null");
        }
                
@@ -1384,14 +1386,14 @@ void StatusNotification::loadThumbnails()
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException( "notification handle is null");
        }
 }
 
 std::vector<std::string> StatusNotification::getThumbnails()
 {
-       LogInfo(" thumbnail Size : " << m_thumbs.size());
+       LoggerI(" thumbnail Size : " << m_thumbs.size());
        return m_thumbs;
 }
 
@@ -1399,7 +1401,7 @@ std::string StatusNotification::getThumbnail(int index)
 {
        if (m_notiHandle)
        {
-               LogInfo(" index : " << index);
+               LoggerI(" index : " << index);
                
                notification_image_type_e type = NOTIFICATION_IMAGE_TYPE_NONE; 
                
@@ -1445,7 +1447,7 @@ std::string StatusNotification::getThumbnail(int index)
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException( "notification handle is null");
        }
 #if 0
@@ -1459,7 +1461,7 @@ std::string StatusNotification::getThumbnail(int index)
 
 void StatusNotification::setThumbnails(std::vector<std::string> thumbs)
 {
-        LogInfo("set thumbnails");
+        LoggerI("set thumbnails");
        if (m_notiHandle)
        {
                std::vector<std::string>::iterator it;
@@ -1477,7 +1479,7 @@ void StatusNotification::setThumbnails(std::vector<std::string> thumbs)
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException( "notification handle is null");
        }
 }
@@ -1486,8 +1488,8 @@ void StatusNotification::setThumbnail( const std::string& thumb, int index)
 {
        if (m_notiHandle)
        {
-               LogInfo(" index : " << index);
-               LogInfo(" thumb : " << thumb);
+               LoggerI(" index : " << index);
+               LoggerI(" thumb : " << thumb);
                notification_image_type_e type = NOTIFICATION_IMAGE_TYPE_NONE; 
                
                switch (index)
@@ -1527,7 +1529,7 @@ void StatusNotification::setThumbnail( const std::string& thumb, int index)
 
 std::string StatusNotification::getBackground()
 {
-       LogInfo(" Handle : " << m_notiHandle);
+       LoggerI(" Handle : " << m_notiHandle);
 
        if (m_notiHandle)
        {
@@ -1545,7 +1547,7 @@ std::string StatusNotification::getBackground()
        }
        else
        {
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException( "notification handle is null");
        }
 
@@ -1553,7 +1555,7 @@ std::string StatusNotification::getBackground()
 
 void StatusNotification::setBackground(const std::string imagePath)
 {
-       LogInfo(" imagePath : " << imagePath);
+       LoggerI(" imagePath : " << imagePath);
        if (m_notiHandle)
        {
                if (getBackground().compare(imagePath))
@@ -1567,14 +1569,14 @@ void StatusNotification::setBackground(const std::string imagePath)
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException( "notification handle is null");
        }
 }
 
 long StatusNotification::getNumber()
 {
-       LogInfo("Handle = " << m_notiHandle);
+       LoggerI("Handle = " << m_notiHandle);
        if (m_notiHandle)
        {
                long number = 0;
@@ -1588,22 +1590,22 @@ long StatusNotification::getNumber()
                if (strNumber)
                        std::istringstream(strNumber) >> number;
                else
-                       LogInfo("Number Is NULL");
+                       LoggerI("Number Is NULL");
 
-               LogInfo("number = " << number);
+               LoggerI("number = " << number);
 
                return number;
        }
        else
        {
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                return 0;
        }
 }
 
 const char* StatusNotification::getStrNumber()
 {
-       LogInfo("Handle = " << m_notiHandle);
+       LoggerI("Handle = " << m_notiHandle);
        if (m_notiHandle)
        {
                char *strNumber = NULL;
@@ -1622,14 +1624,14 @@ const char* StatusNotification::getStrNumber()
        }
        else
        {
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                return NULL;
        }
 }
 
 void StatusNotification::setNumber(const long number)
 {
-       LogInfo("Number = " << number);
+       LoggerI("Number = " << number);
        if (m_notiHandle)
        {
                if(number!=getNumber())
@@ -1652,7 +1654,7 @@ void StatusNotification::setNumber(const long number)
        }
        else
        {               
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException( "notification handle is null");
        }
 }
@@ -1668,7 +1670,7 @@ void StatusNotification::setNotificationHandle(void *handle)
        {
                throw UnknownException( "notification handle null error");
        }
-       LogInfo("handle = " << handle << " m_notiHandle = " << m_notiHandle);
+       LoggerI("handle = " << handle << " m_notiHandle = " << m_notiHandle);
        
        if (m_notiHandle != NULL)
        {       
@@ -1692,7 +1694,7 @@ service_h StatusNotification::getService()
 //Detail Info
 void StatusNotification::loadDetailInfos()
 {
-       LogInfo("noti Handle = " << m_notiHandle);
+       LoggerI("noti Handle = " << m_notiHandle);
 
         if (m_notiHandle)
         {
@@ -1700,14 +1702,14 @@ void StatusNotification::loadDetailInfos()
                {
                    std::string main = getInformation(idx);
                    std::string sub = getSubInformation(idx);
-                   LogInfo("Main : " << main << " Sub : " << sub);
+                   LoggerI("Main : " << main << " Sub : " << sub);
                    NotificationDetailInfo *info = new NotificationDetailInfo(m_notiHandle, idx, main, sub);
                    m_detailInfos.push_back(info);
                }
         }
         else
        {               
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException( "notification handle is null");
        }
         
@@ -1720,7 +1722,7 @@ std::vector<NotificationDetailInfo*> StatusNotification::getDetailInfos() const
 
 void StatusNotification::setDetailInfos(const std::vector<NotificationDetailInfo*> value)
 {
-    LogInfo("DetailInfos = " << value.size());
+    LoggerI("DetailInfos = " << value.size());
 
     if (m_notiHandle)
     {
@@ -1732,7 +1734,7 @@ void StatusNotification::setDetailInfos(const std::vector<NotificationDetailInfo
             NotificationDetailInfo* info = *it;
             if ( idx < MAX_NOTIFICATION_DETAIL_INFO_LENGTH )
             {
-                LogInfo("main " << info->getMainText() << " sub " << info->getSubText() );
+                LoggerI("main " << info->getMainText() << " sub " << info->getSubText() );
                setInformation(info->getMainText(), idx);
                setSubInformation(info->getSubText(), idx);
             }
@@ -1743,7 +1745,7 @@ void StatusNotification::setDetailInfos(const std::vector<NotificationDetailInfo
     }
     else
     {  
-        LogDebug("noti Handle is NULL");
+        LoggerD("noti Handle is NULL");
         throw UnknownException( "notification handle is null");
     }
        
@@ -1764,7 +1766,7 @@ void StatusNotification::clearDetailInfos()
                for (it = m_detailInfos.begin(); it < m_detailInfos.end(); ++it)
                {
                    NotificationDetailInfo* info = *it;
-                   LogInfo("Delete Detail Info : " << info);
+                   LoggerI("Delete Detail Info : " << info);
                    if (info)
                        delete info;
                    idx ++;
@@ -1802,13 +1804,13 @@ std::string StatusNotification::getInformation(int index)
                std::string strInfo;
                if (info)
                        strInfo = info;
-               LogInfo(" info " << strInfo);
+               LoggerI(" info " << strInfo);
                return strInfo;
 
        }
        else
        {       
-               LogWarning("noti Handle is NULL");
+               LoggerW("noti Handle is NULL");
                throw UnknownException( "notification handle is null");
        }
        
@@ -1844,13 +1846,13 @@ std::string StatusNotification::getSubInformation(int index)
                std::string strSubInfo;
                if (subInfo)
                        strSubInfo = subInfo;
-               LogInfo(" subInfo " << strSubInfo);
+               LoggerI(" subInfo " << strSubInfo);
                return strSubInfo;
                                
        }
        else
        {       
-               LogWarning("noti Handle is NULL");
+               LoggerW("noti Handle is NULL");
                throw UnknownException ("notification handle is null");
        }
        
@@ -1861,8 +1863,8 @@ void StatusNotification::setInformation( const std::string& info, int index)
        if (m_notiHandle)
        {
                int idx = index;
-               LogDebug(" index : " << idx);
-               LogDebug(" log : " << info);
+               LoggerD(" index : " << idx);
+               LoggerD(" log : " << info);
                notification_text_type_e type = NOTIFICATION_TEXT_TYPE_NONE; 
                
                switch (idx)
@@ -1894,13 +1896,13 @@ void StatusNotification::setInformation( const std::string& info, int index)
                }
                else
                {       
-                       LogWarning("noti Handle is NULL");
+                       LoggerW("noti Handle is NULL");
                        throw UnknownException("notification handle is null");
                }
        }
        else
        {       
-               LogWarning("noti Handle is NULL");
+               LoggerW("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 }
@@ -1911,8 +1913,8 @@ void StatusNotification::setSubInformation( const std::string& subInfo, int inde
        if (m_notiHandle)
        {
                int idx = index;
-               LogDebug(" index : " << idx);
-               LogDebug(" log : " << subInfo);
+               LoggerD(" index : " << idx);
+               LoggerD(" log : " << subInfo);
                notification_text_type_e type = NOTIFICATION_TEXT_TYPE_NONE; 
                
                switch (idx)
@@ -1945,7 +1947,7 @@ void StatusNotification::setSubInformation( const std::string& subInfo, int inde
        }
        else
        {       
-               LogWarning("noti Handle is NULL");
+               LoggerW("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 }