Fix log tags 95/186195/1
authorsooyeon.kim <sooyeon.kim@samsung.com>
Wed, 8 Aug 2018 04:36:39 +0000 (13:36 +0900)
committersooyeon.kim <sooyeon.kim@samsung.com>
Wed, 8 Aug 2018 04:36:39 +0000 (13:36 +0900)
Change-Id: I1c8f599d804a6073f7d5ab4519b8b138f4ae2cd3
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
common/tts_config_mgr.c
common/tts_config_parser.c
common/tts_defs.h

index 527474d..a5d4e7b 100644 (file)
@@ -36,8 +36,6 @@ typedef struct {
        void*   user_data;
 } tts_config_client_s;
 
-extern char* tts_tag();
-
 static GSList* g_engine_list = NULL;
 
 static GSList* g_config_client_list = NULL;
@@ -67,7 +65,7 @@ static int __tts_config_mgr_unregister_engine_config_updated_event();
 int __tts_config_mgr_check_engine_is_valid(const char* engine_id)
 {
        if (NULL == engine_id) {
-               SLOG(LOG_ERROR, tts_tag(), "Input parameter is NULL");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "Input parameter is NULL");
                return -1;
        }
 
@@ -75,7 +73,7 @@ int __tts_config_mgr_check_engine_is_valid(const char* engine_id)
        tts_engine_info_s *engine_info = NULL;
 
        if (0 >= g_slist_length(g_engine_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "There is no engine!!");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "There is no engine!!");
                return -1;
        }
 
@@ -86,12 +84,12 @@ int __tts_config_mgr_check_engine_is_valid(const char* engine_id)
                engine_info = iter->data;
 
                if (NULL == engine_info) {
-                       SLOG(LOG_ERROR, tts_tag(), "engine info is NULL");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "engine info is NULL");
                        return -1;
                }
 
                if (NULL != engine_info->uuid && 0 == strcmp(engine_id, engine_info->uuid)) {
-                       SLOG(LOG_DEBUG, tts_tag(), "Default engine is valid : %s", engine_id);
+                       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Default engine is valid : %s", engine_id);
                        return 0;
                }
 
@@ -101,13 +99,13 @@ int __tts_config_mgr_check_engine_is_valid(const char* engine_id)
        /* Change default engine */
        iter = g_slist_nth(g_engine_list, 0);
        if (NULL == iter) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] No engine in list");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] No engine in list");
                return TTS_CONFIG_ERROR_OPERATION_FAILED;
        }
 
        engine_info = iter->data;
        if (NULL == g_config_info) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Invalid engine info in list");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Invalid engine info in list");
                return TTS_CONFIG_ERROR_OPERATION_FAILED;
        }
 
@@ -122,7 +120,7 @@ int __tts_config_mgr_check_engine_is_valid(const char* engine_id)
                strncpy(g_config_info->setting, engine_info->setting, sizeof(g_setting) - 1);
        }
 
-       SLOG(LOG_DEBUG, tts_tag(), "Default engine is changed : %s", g_config_info->engine_id);
+       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Default engine is changed : %s", g_config_info->engine_id);
 
        /* Change is default voice */
        GSList *iter_voice = NULL;
@@ -149,7 +147,7 @@ int __tts_config_mgr_check_engine_is_valid(const char* engine_id)
 
                                                g_config_info->type = voice->type;
 
-                                               SLOG(LOG_DEBUG, tts_tag(), "Default voice is changed : lang(%s) type(%d)", voice->language, voice->type);
+                                               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Default voice is changed : lang(%s) type(%d)", voice->language, voice->type);
                                                break;
                                        }
                                }
@@ -166,24 +164,23 @@ int __tts_config_mgr_check_engine_is_valid(const char* engine_id)
 
                iter_voice = g_slist_nth(engine_info->voices, 0);
                if (NULL == iter_voice) {
-                       SLOG(LOG_ERROR, tts_tag(), "Fail to get voice list");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "Fail to get voice list");
                        return TTS_CONFIG_ERROR_OPERATION_FAILED;
                }
                voice = iter_voice->data;
 
                if (NULL == voice || NULL == voice->language) {
-                       SLOG(LOG_ERROR, tts_tag(), "Fail to get voice info from list");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "Fail to get voice info from list");
                        return TTS_CONFIG_ERROR_OPERATION_FAILED;
                }
                strncpy(g_config_info->language, voice->language, sizeof(g_language) - 1);
 
                g_config_info->type = voice->type;
-               SLOG(LOG_DEBUG, tts_tag(), "Default voice is changed : lang(%s) type(%d)", voice->language, voice->type);
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Default voice is changed : lang(%s) type(%d)", voice->language, voice->type);
        }
 
-       if (0 != tts_parser_set_engine(g_config_info->engine_id, g_config_info->setting, 
-               g_config_info->language, g_config_info->type)) {
-               SLOG(LOG_ERROR, tts_tag(), " Fail to save config");
+       if (0 != tts_parser_set_engine(g_config_info->engine_id, g_config_info->setting, g_config_info->language, g_config_info->type)) {
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, " Fail to save config");
                return TTS_CONFIG_ERROR_OPERATION_FAILED;
        }
 
@@ -193,7 +190,7 @@ int __tts_config_mgr_check_engine_is_valid(const char* engine_id)
 bool __tts_config_mgr_check_lang_is_valid(const char* engine_id, const char* language, int type)
 {
        if (NULL == engine_id || NULL == language) {
-               SLOG(LOG_ERROR, tts_tag(), "Input parameter is NULL");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "Input parameter is NULL");
                return false;
        }
 
@@ -201,7 +198,7 @@ bool __tts_config_mgr_check_lang_is_valid(const char* engine_id, const char* lan
        tts_engine_info_s *engine_info = NULL;
 
        if (0 >= g_slist_length(g_engine_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "There is no engine!!");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "There is no engine!!");
                return false;
        }
 
@@ -212,7 +209,7 @@ bool __tts_config_mgr_check_lang_is_valid(const char* engine_id, const char* lan
                engine_info = iter->data;
 
                if (NULL == engine_info) {
-                       SLOG(LOG_ERROR, tts_tag(), "engine info is NULL");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "engine info is NULL");
                        return false;
                }
 
@@ -225,7 +222,7 @@ bool __tts_config_mgr_check_lang_is_valid(const char* engine_id, const char* lan
                tts_config_voice_s* voice = NULL;
 
                if (g_slist_length(engine_info->voices) <= 0) {
-                       SLOG(LOG_ERROR, tts_tag(), "There is no voice : %s", engine_info->uuid);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "There is no voice : %s", engine_info->uuid);
                        iter = g_slist_next(iter);
                        return false;
                }
@@ -260,7 +257,7 @@ bool __tts_config_mgr_check_lang_is_valid(const char* engine_id, const char* lan
 int __tts_config_mgr_select_lang(const char* engine_id, char** language, int* type)
 {
        if (NULL == engine_id || NULL == language) {
-               SLOG(LOG_ERROR, tts_tag(), "Input parameter is NULL");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "Input parameter is NULL");
                return false;
        }
 
@@ -268,7 +265,7 @@ int __tts_config_mgr_select_lang(const char* engine_id, char** language, int* ty
        tts_engine_info_s *engine_info = NULL;
 
        if (0 >= g_slist_length(g_engine_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "There is no engine!!");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "There is no engine!!");
                return false;
        }
 
@@ -279,7 +276,7 @@ int __tts_config_mgr_select_lang(const char* engine_id, char** language, int* ty
                engine_info = iter->data;
 
                if (NULL == engine_info) {
-                       SLOG(LOG_ERROR, tts_tag(), "engine info is NULL");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "engine info is NULL");
                        return false;
                }
 
@@ -292,7 +289,7 @@ int __tts_config_mgr_select_lang(const char* engine_id, char** language, int* ty
                tts_config_voice_s* voice = NULL;
 
                if (g_slist_length(engine_info->voices) <= 0) {
-                       SLOG(LOG_ERROR, tts_tag(), "There is no voice : %s", engine_info->uuid);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "There is no voice : %s", engine_info->uuid);
                        return -1;
                }
 
@@ -307,7 +304,7 @@ int __tts_config_mgr_select_lang(const char* engine_id, char** language, int* ty
                                        *language = strdup(voice->language);
                                        *type = voice->type;
 
-                                       SECURE_SLOG(LOG_DEBUG, tts_tag(), "Selected language(%s) type(%d)", *language, *type);
+                                       SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Selected language(%s) type(%d)", *language, *type);
                                        return 0;
                                }
                        }
@@ -319,7 +316,7 @@ int __tts_config_mgr_select_lang(const char* engine_id, char** language, int* ty
                        *language = strdup(voice->language);
                        *type = voice->type;
 
-                       SECURE_SLOG(LOG_DEBUG, tts_tag(), "Selected language(%s) type(%d)", *language, *type);
+                       SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Selected language(%s) type(%d)", *language, *type);
                        return 0;
                }
                break;
@@ -330,7 +327,7 @@ int __tts_config_mgr_select_lang(const char* engine_id, char** language, int* ty
 
 Eina_Bool tts_config_mgr_inotify_event_cb(void* data, Ecore_Fd_Handler *fd_handler)
 {
-       SLOG(LOG_DEBUG, tts_tag(), "@@@ Config changed callback event");
+       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "@@@ Config changed callback event");
 
        int length;
        struct inotify_event event;
@@ -338,8 +335,8 @@ Eina_Bool tts_config_mgr_inotify_event_cb(void* data, Ecore_Fd_Handler *fd_handl
 
        length = read(g_config_fd_noti, &event, sizeof(struct inotify_event));
        if (0 > length) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Empty Inotify event");
-               SLOG(LOG_DEBUG, tts_tag(), "@@@");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Empty Inotify event");
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "@@@");
                return ECORE_CALLBACK_DONE;
        }
 
@@ -372,7 +369,7 @@ Eina_Bool tts_config_mgr_inotify_event_cb(void* data, Ecore_Fd_Handler *fd_handl
                                strncpy(g_config_info->setting, setting, sizeof(g_setting) - 1);
                        }
 
-                       SECURE_SLOG(LOG_DEBUG, tts_tag(), "Engine change(%s)", g_config_info->engine_id);
+                       SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Engine change(%s)", g_config_info->engine_id);
 
                        /* Call all callbacks of client*/
                        iter = g_slist_nth(g_config_client_list, 0);
@@ -382,7 +379,7 @@ Eina_Bool tts_config_mgr_inotify_event_cb(void* data, Ecore_Fd_Handler *fd_handl
 
                                if (NULL != temp_client) {
                                        if (NULL != temp_client->engine_cb) {
-                                               SECURE_SLOG(LOG_DEBUG, tts_tag(), "Engine changed callback : uid(%d)", temp_client->uid);
+                                               SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Engine changed callback : uid(%d)", temp_client->uid);
                                                temp_client->engine_cb(g_config_info->engine_id, g_config_info->setting, 
                                                        g_config_info->language, g_config_info->type, 
                                                        g_config_info->auto_voice, g_config_info->credential, temp_client->user_data);
@@ -413,7 +410,7 @@ Eina_Bool tts_config_mgr_inotify_event_cb(void* data, Ecore_Fd_Handler *fd_handl
                                g_config_info->type = voice_type;
                        }
 
-                       SECURE_SLOG(LOG_DEBUG, tts_tag(), "Voice change(%s, %d)", g_config_info->language, g_config_info->type);
+                       SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Voice change(%s, %d)", g_config_info->language, g_config_info->type);
 
                        /* Call all callbacks of client*/
                        iter = g_slist_nth(g_config_client_list, 0);
@@ -423,7 +420,7 @@ Eina_Bool tts_config_mgr_inotify_event_cb(void* data, Ecore_Fd_Handler *fd_handl
 
                                if (NULL != temp_client) {
                                        if (NULL != temp_client->voice_cb) {
-                                               SECURE_SLOG(LOG_DEBUG, tts_tag(), "Voice changed callback : uid(%d)", temp_client->uid);
+                                               SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Voice changed callback : uid(%d)", temp_client->uid);
                                                temp_client->voice_cb(before_lang, before_type, 
                                                        g_config_info->language, g_config_info->type, 
                                                        g_config_info->auto_voice, temp_client->user_data);
@@ -442,7 +439,7 @@ Eina_Bool tts_config_mgr_inotify_event_cb(void* data, Ecore_Fd_Handler *fd_handl
                if (-1 != speech_rate) {
                        g_config_info->speech_rate = speech_rate;
 
-                       SECURE_SLOG(LOG_DEBUG, tts_tag(), "Speech rate change(%d)", g_config_info->speech_rate);
+                       SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Speech rate change(%d)", g_config_info->speech_rate);
 
                        /* Call all callbacks of client*/
                        iter = g_slist_nth(g_config_client_list, 0);
@@ -452,7 +449,7 @@ Eina_Bool tts_config_mgr_inotify_event_cb(void* data, Ecore_Fd_Handler *fd_handl
 
                                if (NULL != temp_client) {
                                        if (NULL != temp_client->speech_cb) {
-                                               SECURE_SLOG(LOG_DEBUG, tts_tag(), "Speech rate changed callback : uid(%d)", temp_client->uid);
+                                               SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Speech rate changed callback : uid(%d)", temp_client->uid);
                                                temp_client->speech_cb(g_config_info->speech_rate, temp_client->user_data);
                                        }
                                }
@@ -464,7 +461,7 @@ Eina_Bool tts_config_mgr_inotify_event_cb(void* data, Ecore_Fd_Handler *fd_handl
                if (-1 != pitch) {
                        g_config_info->pitch = pitch;
 
-                       SECURE_SLOG(LOG_DEBUG, tts_tag(), "pitch change(%d)", g_config_info->pitch);
+                       SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "pitch change(%d)", g_config_info->pitch);
 
                        /* Call all callbacks of client*/
                        iter = g_slist_nth(g_config_client_list, 0);
@@ -474,7 +471,7 @@ Eina_Bool tts_config_mgr_inotify_event_cb(void* data, Ecore_Fd_Handler *fd_handl
 
                                if (NULL != temp_client) {
                                        if (NULL != temp_client->pitch_cb) {
-                                               SECURE_SLOG(LOG_DEBUG, tts_tag(), "Pitch changed callback : uid(%d)", temp_client->uid);
+                                               SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Pitch changed callback : uid(%d)", temp_client->uid);
                                                temp_client->pitch_cb(g_config_info->pitch, temp_client->user_data);
                                        }
                                }
@@ -496,16 +493,16 @@ Eina_Bool tts_config_mgr_inotify_event_cb(void* data, Ecore_Fd_Handler *fd_handl
                        lang = NULL;
                }
        } else if (IN_DELETE_SELF == event.mask) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] IN_DELETE_SELF event");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] IN_DELETE_SELF event");
 
                tts_parser_unload_config(g_config_info);
                tts_parser_reset();
                tts_parser_load_config(&g_config_info);
        } else {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Undefined event (0x%x)", event.mask);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Undefined event (0x%x)", event.mask);
        }
 
-       SLOG(LOG_DEBUG, tts_tag(), "@@@");
+       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "@@@");
 
        return ECORE_CALLBACK_PASS_ON;
 }
@@ -518,7 +515,7 @@ int __tts_config_mgr_register_config_event()
 
        fd = inotify_init();
        if (fd < 0) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail get inotify fd");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail get inotify fd");
                return -1;
        }
        g_config_fd_noti = fd;
@@ -529,7 +526,7 @@ int __tts_config_mgr_register_config_event()
        g_config_fd_handler_noti = ecore_main_fd_handler_add(fd, ECORE_FD_READ,
                (Ecore_Fd_Cb)tts_config_mgr_inotify_event_cb, NULL, NULL, NULL);
        if (NULL == g_config_fd_handler_noti) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to get handler_noti");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to get handler_noti");
                return -1;
        }
 
@@ -539,7 +536,7 @@ int __tts_config_mgr_register_config_event()
        value |= O_NONBLOCK;
 
        if (0 > fcntl(fd, F_SETFL, value)) {
-               SLOG(LOG_WARN, tts_tag(), "[WARNING] Fail to set non-block mode");
+               SLOG(LOG_WARN, TAG_TTSCONFIG, "[WARNING] Fail to set non-block mode");
        }
 
        return 0;
@@ -560,7 +557,7 @@ int __tts_config_set_auto_language()
        char* value = NULL;
        value = vconf_get_str(TTS_LANGSET_KEY);
        if (NULL == value) {
-               SLOG(LOG_ERROR, tts_tag(), "[Config ERROR] Fail to get display language");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[Config ERROR] Fail to get display language");
                return -1;
        }
 
@@ -572,7 +569,7 @@ int __tts_config_set_auto_language()
        if (true == __tts_config_mgr_check_lang_is_valid(g_config_info->engine_id, temp_lang, g_config_info->type)) {
                /* tts default voice change */
                if (NULL == g_config_info->language) {
-                       SLOG(LOG_ERROR, tts_tag(), "Current config language is NULL");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "Current config language is NULL");
                        return -1;
                }
 
@@ -580,7 +577,7 @@ int __tts_config_set_auto_language()
                int before_type;
 
                if (0 != tts_parser_set_voice(temp_lang, g_config_info->type)) {
-                       SLOG(LOG_ERROR, tts_tag(), "Fail to save default voice");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "Fail to save default voice");
                        return -1;
                }
 
@@ -591,7 +588,7 @@ int __tts_config_set_auto_language()
                g_config_info->language = g_language;
                strncpy(g_config_info->language, temp_lang, sizeof(g_language) - 1);
 
-               SECURE_SLOG(LOG_DEBUG, tts_tag(), "[Config] Default voice : lang(%s) type(%d)", 
+               SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[Config] Default voice : lang(%s) type(%d)", 
                        g_config_info->language, g_config_info->type);
 
                GSList *iter = NULL;
@@ -623,21 +620,21 @@ int __tts_config_set_auto_language()
                char* tmp_language = NULL;
                int tmp_type = -1;
                if (0 != __tts_config_mgr_select_lang(g_config_info->engine_id, &tmp_language, &tmp_type)) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to select language");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to select language");
                        return -1;
                }
 
                if (NULL == tmp_language) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] language is NULL");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] language is NULL");
                        return -1;
                }
 
                if (0 != tts_parser_set_voice(tmp_language, tmp_type)) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to save config");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to save config");
                        return -1;
                }
 
-               SECURE_SLOG(LOG_DEBUG, tts_tag(), "[Config] Default voice : lang(%s) type(%d)", 
+               SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[Config] Default voice : lang(%s) type(%d)", 
                        tmp_language, tmp_type);
 
                GSList *iter = NULL;
@@ -676,7 +673,7 @@ int __tts_config_set_auto_language()
 void __tts_config_display_language_changed_cb(keynode_t *key, void *data)
 {
        if (NULL == g_config_info) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Current config info is invalid.");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Current config info is invalid.");
                return;
        }
 
@@ -693,7 +690,7 @@ void __tts_config_screen_reader_changed_cb(keynode_t *key, void *data)
        int screen_reader;
        ret = vconf_get_bool(TTS_ACCESSIBILITY_KEY, &screen_reader);
        if (0 != ret) {
-               SLOG(LOG_ERROR, tts_tag(), "[Config ERROR] Fail to get screen reader");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[Config ERROR] Fail to get screen reader");
                return;
        }
 
@@ -741,7 +738,7 @@ int __tts_config_release_client(int uid)
                }
        }
 
-       SLOG(LOG_DEBUG, tts_tag(), "Client count (%d)", g_slist_length(g_config_client_list));
+       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Client count (%d)", g_slist_length(g_config_client_list));
 
        return g_slist_length(g_config_client_list);
 }
@@ -788,7 +785,7 @@ int __tts_config_mgr_get_engine_info()
        /* Copy default info directory to download directory */
        dp  = opendir(TTS_DEFAULT_ENGINE_INFO);
        if (NULL == dp) {
-               SLOG(LOG_DEBUG, tts_tag(), "[CONFIG] No default directory : %s", TTS_DEFAULT_ENGINE_INFO);
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[CONFIG] No default directory : %s", TTS_DEFAULT_ENGINE_INFO);
        } else {
                do {
                        dirp = readdir(dp);
@@ -799,7 +796,7 @@ int __tts_config_mgr_get_engine_info()
 
                                filesize = strlen(TTS_DEFAULT_ENGINE_INFO) + strlen(dirp->d_name) + 2;
                                if (filesize >= 512) {
-                                       SECURE_SLOG(LOG_ERROR, tts_tag(), "[CONFIG ERROR] File path is too long : %s", dirp->d_name);
+                                       SECURE_SLOG(LOG_ERROR, TAG_TTSCONFIG, "[CONFIG ERROR] File path is too long : %s", dirp->d_name);
                                        closedir(dp);
                                        return -1;
                                }
@@ -807,14 +804,14 @@ int __tts_config_mgr_get_engine_info()
                                memset(filepath, '\0', 512);
                                snprintf(filepath, 512, "%s/%s", TTS_DEFAULT_ENGINE_INFO, dirp->d_name);
 
-                               SECURE_SLOG(LOG_DEBUG, tts_tag(), "[CONFIG] Filepath(%s)", filepath);
+                               SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[CONFIG] Filepath(%s)", filepath);
 
                                char dest[512] = {'\0',};
                                snprintf(dest, 512, "%s/%s", TTS_DOWNLOAD_ENGINE_INFO, dirp->d_name);
 
                                if (0 != access(dest, F_OK)) {
                                        if (0 != tts_parser_copy_xml(filepath, dest)) {
-                                               SLOG(LOG_ERROR, tts_tag(), "[CONFIG ERROR] Fail to copy engine info");
+                                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[CONFIG ERROR] Fail to copy engine info");
                                        }
                                }
                        }
@@ -826,7 +823,7 @@ int __tts_config_mgr_get_engine_info()
        /* Get engine info from default engine directory */
        dp  = opendir(TTS_DOWNLOAD_ENGINE_INFO);
        if (NULL == dp) {
-               SLOG(LOG_DEBUG, tts_tag(), "[CONFIG] No downloadable directory : %s", TTS_DOWNLOAD_ENGINE_INFO);
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[CONFIG] No downloadable directory : %s", TTS_DOWNLOAD_ENGINE_INFO);
        } else {
                do {
                        dirp = readdir(dp);
@@ -837,7 +834,7 @@ int __tts_config_mgr_get_engine_info()
 
                                filesize = strlen(TTS_DOWNLOAD_ENGINE_INFO) + strlen(dirp->d_name) + 2;
                                if (filesize >= 512) {
-                                       SECURE_SLOG(LOG_ERROR, tts_tag(), "[CONFIG ERROR] File path is too long : %s", dirp->d_name);
+                                       SECURE_SLOG(LOG_ERROR, TAG_TTSCONFIG, "[CONFIG ERROR] File path is too long : %s", dirp->d_name);
                                        closedir(dp);
                                        return -1;
                                }
@@ -845,12 +842,12 @@ int __tts_config_mgr_get_engine_info()
                                memset(filepath, '\0', 512);
                                snprintf(filepath, 512, "%s/%s", TTS_DOWNLOAD_ENGINE_INFO, dirp->d_name);
 
-                               SECURE_SLOG(LOG_DEBUG, tts_tag(), "[CONFIG] Filepath(%s)", filepath);
+                               SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[CONFIG] Filepath(%s)", filepath);
 
                                if (0 == tts_parser_get_engine_info(filepath, &info)) {
                                        g_engine_list = g_slist_append(g_engine_list, info);
                                        if (0 != __tts_config_mgr_register_engine_config_updated_event(filepath)) {
-                                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to register engine config updated event");
+                                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to register engine config updated event");
                                        }
                                }
                        }
@@ -860,7 +857,7 @@ int __tts_config_mgr_get_engine_info()
        }
 
        if (0 >= g_slist_length(g_engine_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] No engine");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] No engine");
                return -1;
        }
 
@@ -869,7 +866,7 @@ int __tts_config_mgr_get_engine_info()
 
 static Eina_Bool __tts_config_mgr_engine_config_inotify_event_callback(void* data, Ecore_Fd_Handler *fd_handler)
 {
-       SLOG(LOG_DEBUG, tts_tag(), "@@@ Engine config updated callback event");
+       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "@@@ Engine config updated callback event");
 
        tts_engine_inotify_s *ino = (tts_engine_inotify_s *)data;
        int dir_fd = ino->dir_fd;
@@ -880,32 +877,32 @@ static Eina_Bool __tts_config_mgr_engine_config_inotify_event_callback(void* dat
 
        length = read(dir_fd, &event, sizeof(struct inotify_event));
        if (0 > length) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Empty Inotify event");
-               SLOG(LOG_DEBUG, tts_tag(), "@@@");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Empty Inotify event");
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "@@@");
                return ECORE_CALLBACK_DONE;
        }
 
        if (IN_CLOSE_WRITE == event.mask) {
                int ret = __tts_config_mgr_get_engine_info();
                if (0 != ret) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to get engine info when config updated");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to get engine info when config updated");
                }
                __tts_config_mgr_print_engine_info();
                bool support = tts_config_check_default_voice_is_valid(g_config_info->language, g_config_info->type);
                if (false == support) {
-                       SLOG(LOG_DEBUG, tts_tag(), "[ERROR] Default voice is valid");
+                       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[ERROR] Default voice is valid");
                        char* temp_lang = NULL;
                        int temp_type;
                        ret = __tts_config_mgr_select_lang(g_config_info->engine_id, &temp_lang, &temp_type);
                        if (0 != ret) {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to get voice");
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to get voice");
                        }
 
                        ret = tts_config_mgr_set_voice(temp_lang, temp_type);
                        if (0 != ret) {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to set voice");
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to set voice");
                        } else {
-                               SLOG(LOG_DEBUG, tts_tag(), "[DEBUG] Saved default voice : lang(%s), type(%d)", g_config_info->language, g_config_info->type);
+                               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[DEBUG] Saved default voice : lang(%s), type(%d)", g_config_info->language, g_config_info->type);
                        }
                        if (NULL != temp_lang) {
                                free(temp_lang);
@@ -923,7 +920,7 @@ static Eina_Bool __tts_config_mgr_engine_config_inotify_event_callback(void* dat
 
                        if (NULL != temp_client) {
                                if (NULL != temp_client->engine_cb) {
-                                       SECURE_SLOG(LOG_DEBUG, tts_tag(), "Engine changed callback : uid(%d)", temp_client->uid);
+                                       SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Engine changed callback : uid(%d)", temp_client->uid);
                                        temp_client->engine_cb(g_config_info->engine_id, g_config_info->setting,
                                                g_config_info->language, g_config_info->type, 
                                                g_config_info->auto_voice, g_config_info->credential, temp_client->user_data);
@@ -933,10 +930,10 @@ static Eina_Bool __tts_config_mgr_engine_config_inotify_event_callback(void* dat
                        iter = g_slist_next(iter);
                }
        } else {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Undefined event");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Undefined event");
        }
 
-       SLOG(LOG_DEBUG, tts_tag(), "@@@");
+       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "@@@");
 
        return ECORE_CALLBACK_PASS_ON;
 }
@@ -944,20 +941,20 @@ static Eina_Bool __tts_config_mgr_engine_config_inotify_event_callback(void* dat
 static int __tts_config_mgr_register_engine_config_updated_event(const char* path)
 {
        if (NULL == path) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Path is NULL");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Path is NULL");
                return -1;
        }
 
        /* For engine directory monitoring */
        tts_engine_inotify_s *ino = (tts_engine_inotify_s *)calloc(1, sizeof(tts_engine_inotify_s));
        if (NULL == ino) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to allocate memory");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to allocate memory");
                return -1;
        }
 
        ino->dir_fd = inotify_init();
        if (ino->dir_fd < 0) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to init inotify");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to init inotify");
                free(ino);
                ino = NULL;
 
@@ -965,9 +962,9 @@ static int __tts_config_mgr_register_engine_config_updated_event(const char* pat
        }
 
        ino->dir_wd = inotify_add_watch(ino->dir_fd, path, IN_CLOSE_WRITE);
-       SLOG(LOG_DEBUG, tts_tag(), "Add inotify watch(%s)", path);
+       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Add inotify watch(%s)", path);
        if (ino->dir_wd < 0) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to add watch");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to add watch");
                free(ino);
                ino = NULL;
                return -1;
@@ -975,7 +972,7 @@ static int __tts_config_mgr_register_engine_config_updated_event(const char* pat
 
        ino->dir_fd_handler = ecore_main_fd_handler_add(ino->dir_fd, ECORE_FD_READ, (Ecore_Fd_Cb)__tts_config_mgr_engine_config_inotify_event_callback, (void *)ino, NULL, NULL);
        if (NULL == ino->dir_fd_handler) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to add fd handler");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to add fd handler");
                free(ino);
                ino = NULL;
                return -1;
@@ -987,7 +984,7 @@ static int __tts_config_mgr_register_engine_config_updated_event(const char* pat
        value |= O_NONBLOCK;
 
        if (0 > fcntl(ino->dir_fd, F_SETFL, value)) {
-               SLOG(LOG_WARN, tts_tag(), "[WARNING] Fail to set non-block mode");
+               SLOG(LOG_WARN, TAG_TTSCONFIG, "[WARNING] Fail to set non-block mode");
        }
 
        g_ino_list = g_list_append(g_ino_list, ino);
@@ -1038,7 +1035,7 @@ int tts_config_mgr_initialize(int uid)
                        get_uid = iter->data;
 
                        if (uid == *get_uid) {
-                               SECURE_SLOG(LOG_WARN, tts_tag(), "[CONFIG] uid(%d) has already registered", uid);
+                               SECURE_SLOG(LOG_WARN, TAG_TTSCONFIG, "[CONFIG] uid(%d) has already registered", uid);
                                return 0;
                        }
 
@@ -1047,7 +1044,7 @@ int tts_config_mgr_initialize(int uid)
 
                temp_client = (tts_config_client_s*)calloc(1, sizeof(tts_config_client_s));
                if (NULL == temp_client) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to allocate memory");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to allocate memory");
                        return TTS_CONFIG_ERROR_OUT_OF_MEMORY;
                }
                temp_client->uid = uid;
@@ -1060,12 +1057,12 @@ int tts_config_mgr_initialize(int uid)
 
                g_config_client_list = g_slist_append(g_config_client_list, temp_client);
 
-               SECURE_SLOG(LOG_WARN, tts_tag(), "[CONFIG] Add uid(%d) but config has already initialized", uid);
+               SECURE_SLOG(LOG_WARN, TAG_TTSCONFIG, "[CONFIG] Add uid(%d) but config has already initialized", uid);
                return 0;
        } else {
                temp_client = (tts_config_client_s*)calloc(1, sizeof(tts_config_client_s));
                if (NULL == temp_client) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to allocate memory");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to allocate memory");
                        return TTS_CONFIG_ERROR_OUT_OF_MEMORY;
                }
                temp_client->uid = uid;
@@ -1081,46 +1078,46 @@ int tts_config_mgr_initialize(int uid)
 
        if (0 != access(TTS_CONFIG_BASE, F_OK)) {
                if (0 != mkdir(TTS_CONFIG_BASE, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to make directory : %s", TTS_CONFIG_BASE);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to make directory : %s", TTS_CONFIG_BASE);
                        __tts_config_release_client(uid);
                        return TTS_CONFIG_ERROR_OPERATION_FAILED;
                } else {
-                       SLOG(LOG_DEBUG, tts_tag(), "Success to make directory : %s", TTS_CONFIG_BASE);
+                       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Success to make directory : %s", TTS_CONFIG_BASE);
                }
        }
 
        if (0 != access(TTS_HOME, F_OK)) {
                if (0 != mkdir(TTS_HOME, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to make directory : %s", TTS_HOME);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to make directory : %s", TTS_HOME);
                        __tts_config_release_client(uid);
                        return TTS_CONFIG_ERROR_OPERATION_FAILED;
                } else {
-                       SLOG(LOG_DEBUG, tts_tag(), "Success to make directory : %s", TTS_HOME);
+                       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Success to make directory : %s", TTS_HOME);
                }
        }
 
        if (0 != access(TTS_DOWNLOAD_BASE, F_OK)) {
                if (0 != mkdir(TTS_DOWNLOAD_BASE, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to make directory : %s", TTS_DOWNLOAD_BASE);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to make directory : %s", TTS_DOWNLOAD_BASE);
                        __tts_config_release_client(uid);
                        return TTS_CONFIG_ERROR_OPERATION_FAILED;
                } else {
-                       SLOG(LOG_DEBUG, tts_tag(), "Success to make directory : %s", TTS_DOWNLOAD_BASE);
+                       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Success to make directory : %s", TTS_DOWNLOAD_BASE);
                }
        }
 
        if (0 != access(TTS_DOWNLOAD_ENGINE_INFO, F_OK)) {
                if (0 != mkdir(TTS_DOWNLOAD_ENGINE_INFO, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to make directory : %s", TTS_DOWNLOAD_ENGINE_INFO);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to make directory : %s", TTS_DOWNLOAD_ENGINE_INFO);
                        __tts_config_release_client(uid);
                        return TTS_CONFIG_ERROR_OPERATION_FAILED;
                } else {
-                       SLOG(LOG_DEBUG, tts_tag(), "Success to make directory : %s", TTS_DOWNLOAD_ENGINE_INFO);
+                       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Success to make directory : %s", TTS_DOWNLOAD_ENGINE_INFO);
                }
        }
 
        if (0 != __tts_config_mgr_get_engine_info()) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to get engine info");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to get engine info");
                __tts_config_release_client(uid);
                __tts_config_release_engine();
                return TTS_CONFIG_ERROR_ENGINE_NOT_FOUND;
@@ -1129,7 +1126,7 @@ int tts_config_mgr_initialize(int uid)
        __tts_config_mgr_print_engine_info();
 
        if (0 != tts_parser_load_config(&g_config_info)) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to parse configure information");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to parse configure information");
                __tts_config_release_client(uid);
                __tts_config_release_engine();
                return TTS_CONFIG_ERROR_OPERATION_FAILED;
@@ -1137,7 +1134,7 @@ int tts_config_mgr_initialize(int uid)
 
        /* Check whether engine id is valid */
        if (0 != __tts_config_mgr_check_engine_is_valid(g_config_info->engine_id)) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to get default engine");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to get default engine");
                __tts_config_release_client(uid);
                __tts_config_release_engine();
                tts_parser_unload_config(g_config_info);
@@ -1154,7 +1151,7 @@ int tts_config_mgr_initialize(int uid)
                        char* tmp_language = NULL;
                        int tmp_type = -1;
                        if (0 != __tts_config_mgr_select_lang(g_config_info->engine_id, &tmp_language, &tmp_type)) {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to select language");
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to select language");
                                __tts_config_release_client(uid);
                                __tts_config_release_engine();
                                tts_parser_unload_config(g_config_info);
@@ -1173,7 +1170,7 @@ int tts_config_mgr_initialize(int uid)
                                tmp_language = NULL;
 
                                if (0 != tts_parser_set_voice(g_config_info->language, g_config_info->type)) {
-                                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to save config");
+                                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to save config");
                                        __tts_config_release_client(uid);
                                        __tts_config_release_engine();
                                        tts_parser_unload_config(g_config_info);
@@ -1185,18 +1182,18 @@ int tts_config_mgr_initialize(int uid)
        }
 
        /* print daemon config */
-       SLOG(LOG_DEBUG, tts_tag(), "@@@ TTS config @@@");
-       SECURE_SLOG(LOG_DEBUG, tts_tag(), " engine : %s", g_config_info->engine_id);
-       SECURE_SLOG(LOG_DEBUG, tts_tag(), " setting : %s", g_config_info->setting);
-       SECURE_SLOG(LOG_DEBUG, tts_tag(), " auto voice : %s", g_config_info->auto_voice ? "on" : "off");
-       SECURE_SLOG(LOG_DEBUG, tts_tag(), " language : %s", g_config_info->language);
-       SECURE_SLOG(LOG_DEBUG, tts_tag(), " voice type : %d", g_config_info->type);
-       SECURE_SLOG(LOG_DEBUG, tts_tag(), " speech rate : %d", g_config_info->speech_rate);
-       SECURE_SLOG(LOG_DEBUG, tts_tag(), " pitch : %d", g_config_info->pitch);
-       SLOG(LOG_DEBUG, tts_tag(), "@@@@@");
+       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "@@@ TTS config @@@");
+       SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, " engine : %s", g_config_info->engine_id);
+       SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, " setting : %s", g_config_info->setting);
+       SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, " auto voice : %s", g_config_info->auto_voice ? "on" : "off");
+       SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, " language : %s", g_config_info->language);
+       SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, " voice type : %d", g_config_info->type);
+       SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, " speech rate : %d", g_config_info->speech_rate);
+       SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, " pitch : %d", g_config_info->pitch);
+       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "@@@@@");
 
        if (0 != __tts_config_mgr_register_config_event()) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to register config event");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to register config event");
                __tts_config_release_client(uid);
                __tts_config_release_engine();
                tts_parser_unload_config(g_config_info);
@@ -1210,7 +1207,7 @@ int tts_config_mgr_initialize(int uid)
 
        /* For engine directory monitoring */
        //if (0 != __tts_config_mgr_register_engine_config_updated_event()) {
-       //      SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to register engine config updated event");
+       //      SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to register engine config updated event");
        //      __tts_config_release_client(uid);
        //      __tts_config_release_engine();
        //      tts_parser_unload_config(g_config_info);
@@ -1305,7 +1302,7 @@ int tts_config_mgr_unset_callback(int uid)
 int tts_config_set_screen_reader_callback(int uid, tts_config_screen_reader_changed_cb callback)
 {
        if (NULL == callback) {
-               SLOG(LOG_ERROR, tts_tag(), "Input parameter is NULL");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "Input parameter is NULL");
                return TTS_CONFIG_ERROR_INVALID_PARAMETER;
        }
 
@@ -1355,7 +1352,7 @@ int tts_config_unset_screen_reader_callback(int uid)
 int tts_config_mgr_get_engine_list(tts_config_supported_engine_cb callback, void* user_data)
 {
        if (0 >= g_slist_length(g_config_client_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "Not initialized");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "Not initialized");
                return TTS_CONFIG_ERROR_INVALID_STATE;
        }
 
@@ -1363,7 +1360,7 @@ int tts_config_mgr_get_engine_list(tts_config_supported_engine_cb callback, void
        tts_engine_info_s *engine_info = NULL;
 
        if (0 >= g_slist_length(g_engine_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "There is no engine!!");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "There is no engine!!");
                return TTS_CONFIG_ERROR_ENGINE_NOT_FOUND;
        }
 
@@ -1388,12 +1385,12 @@ int tts_config_mgr_get_engine_list(tts_config_supported_engine_cb callback, void
 int tts_config_mgr_get_engine(char** engine)
 {
        if (0 >= g_slist_length(g_config_client_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "Not initialized");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "Not initialized");
                return TTS_CONFIG_ERROR_INVALID_STATE;
        }
 
        if (NULL == engine) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Input parameter is NULL");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Input parameter is NULL");
                return TTS_CONFIG_ERROR_INVALID_PARAMETER;
        }
 
@@ -1403,7 +1400,7 @@ int tts_config_mgr_get_engine(char** engine)
                tts_engine_info_s *engine_info = NULL;
 
                if (0 >= g_slist_length(g_engine_list)) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] There is no engine!!");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] There is no engine!!");
                        return TTS_CONFIG_ERROR_ENGINE_NOT_FOUND;
                }
 
@@ -1422,9 +1419,9 @@ int tts_config_mgr_get_engine(char** engine)
                        iter = g_slist_next(iter);
                }
 
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Current engine id is not valid");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Current engine id is not valid");
        } else {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Engine id is NULL");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Engine id is NULL");
        }
 
        return TTS_CONFIG_ERROR_OPERATION_FAILED;
@@ -1439,28 +1436,28 @@ int __tts_set_buxtonkey(const char* engine)
 
        int ret = buxton_open(&bux_cli, NULL, NULL);
        if (0 != ret) {
-               SLOG(LOG_ERROR, tts_tag(), "[DBUS-BUXTON2] buxton_open failed!! (%d)", ret);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[DBUS-BUXTON2] buxton_open failed!! (%d)", ret);
                return TTS_CONFIG_ERROR_OPERATION_FAILED;
        }
        bux_layer = buxton_create_layer("system");
        if (NULL == bux_layer) {
-               SLOG(LOG_ERROR, tts_tag(), "[DBUS-BUXTON2] buxton_create_layer FAIL");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[DBUS-BUXTON2] buxton_create_layer FAIL");
                buxton_close(bux_cli);
                return TTS_CONFIG_ERROR_OPERATION_FAILED;
        }
        bux_val = buxton_value_create_string(engine);
        if (NULL == bux_val) {
-               SLOG(LOG_ERROR, tts_tag(), "[DBUS-BUXTON2] buxton_value_create_string FAIL");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[DBUS-BUXTON2] buxton_value_create_string FAIL");
                buxton_free_layer(bux_layer);
                buxton_close(bux_cli);
                return TTS_CONFIG_ERROR_OPERATION_FAILED;
        } else {
-               SLOG(LOG_DEBUG, tts_tag(), "[DBUS-BUXTON2] layer: %s", buxton_layer_get_name(bux_layer));
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[DBUS-BUXTON2] layer: %s", buxton_layer_get_name(bux_layer));
        }
 
        ret = buxton_set_value_sync(bux_cli, bux_layer, TTS_ENGINE_DB_DEFAULT, bux_val);
        if (0 != ret) {
-               SLOG(LOG_ERROR, tts_tag(), "[DBUS-BUXTON2] buxton_set_value_sync failed!! (%d)", ret);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[DBUS-BUXTON2] buxton_set_value_sync failed!! (%d)", ret);
                buxton_value_free(bux_val);
                buxton_free_layer(bux_layer);
                buxton_close(bux_cli);
@@ -1471,7 +1468,7 @@ int __tts_set_buxtonkey(const char* engine)
 
                return TTS_CONFIG_ERROR_OPERATION_FAILED;
        } else {
-               SLOG(LOG_DEBUG, tts_tag(), "[DBUS-BUXTON2] buxton_set_value_sync: %d, %s", ret, TTS_ENGINE_DB_DEFAULT);
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[DBUS-BUXTON2] buxton_set_value_sync: %d, %s", ret, TTS_ENGINE_DB_DEFAULT);
        }
 
        buxton_value_free(bux_val);
@@ -1488,7 +1485,7 @@ int __tts_set_buxtonkey(const char* engine)
 int tts_config_mgr_set_engine(const char* engine)
 {
        if (0 >= g_slist_length(g_config_client_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "Not initialized");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "Not initialized");
                return TTS_CONFIG_ERROR_INVALID_STATE;
        }
 
@@ -1500,15 +1497,15 @@ int tts_config_mgr_set_engine(const char* engine)
                return 0;
 
        if (0 >= g_slist_length(g_engine_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] There is no engine!!");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] There is no engine!!");
                return TTS_CONFIG_ERROR_ENGINE_NOT_FOUND;
        }
 
-       SLOG(LOG_DEBUG, tts_tag(), "New engine id : %s", engine);
+       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "New engine id : %s", engine);
 
        int ret = __tts_set_buxtonkey(engine);
        if (0 != ret) {
-               SLOG(LOG_DEBUG, tts_tag(), "[DEBUG] set_buxtonkey Fail!!");
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[DEBUG] set_buxtonkey Fail!!");
                return ret;
        }
 
@@ -1523,7 +1520,7 @@ int tts_config_mgr_set_engine(const char* engine)
                engine_info = iter->data;
 
                if (NULL == engine_info) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Engine info is NULL");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Engine info is NULL");
                        iter = g_slist_next(iter);
                        continue;
                }
@@ -1559,7 +1556,7 @@ int tts_config_mgr_set_engine(const char* engine)
                        if (NULL != voice) {
                                if (NULL == voice->language)
                                        continue;
-                               SLOG(LOG_DEBUG, tts_tag(), " lang(%s) type(%d)", voice->language, voice->type);
+                               SLOG(LOG_DEBUG, TAG_TTSCONFIG, " lang(%s) type(%d)", voice->language, voice->type);
 
                                if (0 == strcmp(voice->language, g_config_info->language)) {
                                        if (voice->type == g_config_info->type) {
@@ -1596,19 +1593,19 @@ int tts_config_mgr_set_engine(const char* engine)
        }
 
        if (true == is_valid_engine) {
-               SLOG(LOG_DEBUG, tts_tag(), "[Config] Engine changed");
-               SECURE_SLOG(LOG_DEBUG, tts_tag(), "  Engine : %s", g_config_info->engine_id);
-               SECURE_SLOG(LOG_DEBUG, tts_tag(), "  Setting : %s", g_config_info->setting);
-               SECURE_SLOG(LOG_DEBUG, tts_tag(), "  Language : %s", g_config_info->language);
-               SECURE_SLOG(LOG_DEBUG, tts_tag(), "  Type : %d", g_config_info->type);
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[Config] Engine changed");
+               SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "  Engine : %s", g_config_info->engine_id);
+               SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "  Setting : %s", g_config_info->setting);
+               SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "  Language : %s", g_config_info->language);
+               SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "  Type : %d", g_config_info->type);
 
                if (0 != tts_parser_set_engine(g_config_info->engine_id, g_config_info->setting,
                        g_config_info->language, g_config_info->type)) {
-                               SLOG(LOG_ERROR, tts_tag(), " Fail to save config");
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, " Fail to save config");
                                return TTS_CONFIG_ERROR_OPERATION_FAILED;
                }
        } else {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Engine id is not valid");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Engine id is not valid");
                return TTS_CONFIG_ERROR_OPERATION_FAILED;
        }
 
@@ -1618,12 +1615,12 @@ int tts_config_mgr_set_engine(const char* engine)
 int tts_config_mgr_get_voice_list(const char* engine_id, tts_config_supported_voice_cb callback, void* user_data)
 {
        if (0 >= g_slist_length(g_config_client_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "Not initialized");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "Not initialized");
                return TTS_CONFIG_ERROR_INVALID_STATE;
        }
 
        if (0 >= g_slist_length(g_engine_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] There is no engine");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] There is no engine");
                return TTS_CONFIG_ERROR_ENGINE_NOT_FOUND;
        }
 
@@ -1637,7 +1634,7 @@ int tts_config_mgr_get_voice_list(const char* engine_id, tts_config_supported_vo
                engine_info = iter->data;
 
                if (NULL == engine_info) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] engine info is NULL");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] engine info is NULL");
                        return TTS_CONFIG_ERROR_OPERATION_FAILED;
                }
 
@@ -1656,7 +1653,7 @@ int tts_config_mgr_get_voice_list(const char* engine_id, tts_config_supported_vo
                        /*Get handle data from list*/
                        voice = iter_voice->data;
 
-                       SLOG(LOG_DEBUG, tts_tag(), " lang(%s) type(%d)", voice->language, voice->type);
+                       SLOG(LOG_DEBUG, TAG_TTSCONFIG, " lang(%s) type(%d)", voice->language, voice->type);
                        if (NULL != voice->language) {
                                if (false == callback(engine_info->uuid, voice->language, voice->type, user_data))
                                        break;
@@ -1674,12 +1671,12 @@ int tts_config_mgr_get_voice_list(const char* engine_id, tts_config_supported_vo
 int tts_config_mgr_get_voice(char** language, int* type)
 {
        if (0 >= g_slist_length(g_config_client_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "Not initialized");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "Not initialized");
                return TTS_CONFIG_ERROR_INVALID_PARAMETER;
        }
 
        if (0 >= g_slist_length(g_engine_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] There is no engine");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] There is no engine");
                return TTS_CONFIG_ERROR_ENGINE_NOT_FOUND;
        }
 
@@ -1690,7 +1687,7 @@ int tts_config_mgr_get_voice(char** language, int* type)
                *language = strdup(g_config_info->language);
                *type = g_config_info->type;
        } else {
-               SLOG(LOG_ERROR, tts_tag(), "language is NULL");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "language is NULL");
                return TTS_CONFIG_ERROR_OPERATION_FAILED;
        }
 
@@ -1700,23 +1697,23 @@ int tts_config_mgr_get_voice(char** language, int* type)
 int tts_config_mgr_set_voice(const char* language, int type)
 {
        if (0 >= g_slist_length(g_config_client_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "Not initialized");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "Not initialized");
                return TTS_CONFIG_ERROR_INVALID_PARAMETER;
        }
 
        if (NULL == language) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Input parameter is NULL");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Input parameter is NULL");
                return TTS_CONFIG_ERROR_INVALID_PARAMETER;
        }
 
        if (0 >= g_slist_length(g_engine_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] There is no engine");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] There is no engine");
                return TTS_CONFIG_ERROR_ENGINE_NOT_FOUND;
        }
 
        /* Check language is valid */
        if (0 != tts_parser_set_voice(language, type)) {
-               SLOG(LOG_ERROR, tts_tag(), "Fail to save default voice");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "Fail to save default voice");
                return TTS_CONFIG_ERROR_OPERATION_FAILED;
        }
        memset(g_language, '\0', sizeof(g_language));
@@ -1731,7 +1728,7 @@ int tts_config_mgr_set_voice(const char* language, int type)
 int tts_config_mgr_get_auto_voice(bool* value)
 {
        if (0 >= g_slist_length(g_config_client_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "Not initialized");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "Not initialized");
                return TTS_CONFIG_ERROR_INVALID_PARAMETER;
        }
 
@@ -1746,14 +1743,14 @@ int tts_config_mgr_get_auto_voice(bool* value)
 int tts_config_mgr_set_auto_voice(bool value)
 {
        if (0 >= g_slist_length(g_config_client_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "Not initialized");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "Not initialized");
                return TTS_CONFIG_ERROR_INVALID_PARAMETER;
        }
 
        if (g_config_info->auto_voice != value) {
                /* Check language is valid */
                if (0 != tts_parser_set_auto_voice(value)) {
-                       SLOG(LOG_ERROR, tts_tag(), "Fail to save auto voice option");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "Fail to save auto voice option");
                        return TTS_CONFIG_ERROR_OPERATION_FAILED;
                }
                g_config_info->auto_voice = value;
@@ -1769,7 +1766,7 @@ int tts_config_mgr_set_auto_voice(bool value)
 int tts_config_mgr_get_speech_rate(int* value)
 {
        if (0 >= g_slist_length(g_config_client_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "Not initialized");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "Not initialized");
                return TTS_CONFIG_ERROR_INVALID_PARAMETER;
        }
 
@@ -1785,20 +1782,20 @@ int tts_config_mgr_get_speech_rate(int* value)
 int tts_config_mgr_set_speech_rate(int value)
 {
        if (0 >= g_slist_length(g_config_client_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "Not initialized");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "Not initialized");
                return TTS_CONFIG_ERROR_INVALID_PARAMETER;
        }
 
        if (TTS_CONFIG_SPEED_MIN <= value && value <= TTS_CONFIG_SPEED_MAX) {
-               SLOG(LOG_DEBUG, tts_tag(), "[Config] Set speech rate : %d", value);
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[Config] Set speech rate : %d", value);
                if (0 != tts_parser_set_speech_rate(value)) {
-                       SLOG(LOG_ERROR, tts_tag(), "Fail to save speech rate");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "Fail to save speech rate");
                        return TTS_CONFIG_ERROR_OPERATION_FAILED;
                }
 
                g_config_info->speech_rate = value;
        } else {
-               SLOG(LOG_ERROR, tts_tag(), "[Config ERROR] Speech rate is invalid : %d", value);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[Config ERROR] Speech rate is invalid : %d", value);
        }
 
        return 0;
@@ -1807,7 +1804,7 @@ int tts_config_mgr_set_speech_rate(int value)
 int tts_config_mgr_get_pitch(int* value)
 {
        if (0 >= g_slist_length(g_config_client_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "Not initialized");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "Not initialized");
                return TTS_CONFIG_ERROR_INVALID_PARAMETER;
        }
 
@@ -1819,7 +1816,7 @@ int tts_config_mgr_get_pitch(int* value)
        tts_engine_info_s *engine_info = NULL;
 
        if (0 >= g_slist_length(g_engine_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] There is no engine!!");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] There is no engine!!");
                return TTS_CONFIG_ERROR_ENGINE_NOT_FOUND;
        }
 
@@ -1830,7 +1827,7 @@ int tts_config_mgr_get_pitch(int* value)
                engine_info = iter->data;
 
                if (NULL == engine_info) {
-                       SLOG(LOG_ERROR, tts_tag(), "engine info is NULL");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "engine info is NULL");
                        return TTS_CONFIG_ERROR_OPERATION_FAILED;
                }
 
@@ -1854,7 +1851,7 @@ int tts_config_mgr_get_pitch(int* value)
 int tts_config_mgr_set_pitch(int value)
 {
        if (0 >= g_slist_length(g_config_client_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "Not initialized");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "Not initialized");
                return -1;
        }
 
@@ -1862,7 +1859,7 @@ int tts_config_mgr_set_pitch(int value)
        tts_engine_info_s *engine_info = NULL;
 
        if (0 >= g_slist_length(g_engine_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] There is no engine!!");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] There is no engine!!");
                return TTS_CONFIG_ERROR_ENGINE_NOT_FOUND;
        }
 
@@ -1873,7 +1870,7 @@ int tts_config_mgr_set_pitch(int value)
                engine_info = iter->data;
 
                if (NULL == engine_info) {
-                       SLOG(LOG_ERROR, tts_tag(), "engine info is NULL");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "engine info is NULL");
                        return TTS_CONFIG_ERROR_OPERATION_FAILED;
                }
 
@@ -1890,7 +1887,7 @@ int tts_config_mgr_set_pitch(int value)
        }
 
        if (0 != tts_parser_set_pitch(value)) {
-               SLOG(LOG_ERROR, tts_tag(), "Fail to save speech rate");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "Fail to save speech rate");
                return TTS_CONFIG_ERROR_OPERATION_FAILED;
        }
 
@@ -1902,7 +1899,7 @@ int tts_config_mgr_set_pitch(int value)
 bool tts_config_check_default_engine_is_valid(const char* engine)
 {
        if (0 >= g_slist_length(g_config_client_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "Not initialized");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "Not initialized");
                return -1;
        }
 
@@ -1935,7 +1932,7 @@ bool tts_config_check_default_engine_is_valid(const char* engine)
 bool tts_config_check_default_voice_is_valid(const char* language, int type)
 {
        if (0 >= g_slist_length(g_config_client_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "Not initialized");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "Not initialized");
                return -1;
        }
 
@@ -1943,7 +1940,7 @@ bool tts_config_check_default_voice_is_valid(const char* language, int type)
                return false;
 
        if (0 == strlen(g_config_info->engine_id)) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Default engine id is NULL");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Default engine id is NULL");
                return false;
        }
 
@@ -1960,7 +1957,7 @@ bool tts_config_check_default_voice_is_valid(const char* language, int type)
                engine_info = iter->data;
 
                if (NULL == engine_info) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Engine info is NULL");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Engine info is NULL");
                        iter = g_slist_next(iter);
                        continue;
                }
@@ -1999,27 +1996,27 @@ int __tts_config_mgr_print_engine_info()
        tts_engine_info_s *engine_info = NULL;
 
        if (0 >= g_slist_length(g_engine_list)) {
-               SLOG(LOG_DEBUG, tts_tag(), "-------------- engine list -----------------");
-               SLOG(LOG_DEBUG, tts_tag(), "  No Engine in engine directory");
-               SLOG(LOG_DEBUG, tts_tag(), "--------------------------------------------");
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "-------------- engine list -----------------");
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "  No Engine in engine directory");
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "--------------------------------------------");
                return 0;
        }
 
        /* Get a first item */
        iter = g_slist_nth(g_engine_list, 0);
 
-       SLOG(LOG_DEBUG, tts_tag(), "--------------- engine list -----------------");
+       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "--------------- engine list -----------------");
 
        int i = 1;
        while (NULL != iter) {
                engine_info = iter->data;
 
-               SLOG(LOG_DEBUG, tts_tag(), "[%dth]", i);
-               SLOG(LOG_DEBUG, tts_tag(), " name : %s", engine_info->name);
-               SLOG(LOG_DEBUG, tts_tag(), " id   : %s", engine_info->uuid);
-               SLOG(LOG_DEBUG, tts_tag(), " setting : %s", engine_info->setting);
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[%dth]", i);
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, " name : %s", engine_info->name);
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, " id   : %s", engine_info->uuid);
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, " setting : %s", engine_info->setting);
 
-               SLOG(LOG_DEBUG, tts_tag(), " Voices");
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, " Voices");
                GSList *iter_voice = NULL;
                tts_config_voice_s* voice = NULL;
 
@@ -2032,19 +2029,19 @@ int __tts_config_mgr_print_engine_info()
                                /*Get handle data from list*/
                                voice = iter_voice->data;
 
-                               SLOG(LOG_DEBUG, tts_tag(), "  [%dth] lang(%s) type(%d)", j, voice->language, voice->type);
+                               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "  [%dth] lang(%s) type(%d)", j, voice->language, voice->type);
 
                                /*Get next item*/
                                iter_voice = g_slist_next(iter_voice);
                                j++;
                        }
                } else {
-                       SLOG(LOG_ERROR, tts_tag(), "  Voice is NONE");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "  Voice is NONE");
                }
                iter = g_slist_next(iter);
                i++;
        }
-       SLOG(LOG_DEBUG, tts_tag(), "--------------------------------------------");
+       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "--------------------------------------------");
 
        return 0;
 }
@@ -2052,7 +2049,7 @@ int __tts_config_mgr_print_engine_info()
 int tts_config_mgr_get_max_text_size(unsigned int* size)
 {
        if (0 >= g_slist_length(g_config_client_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "Not initialized");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "Not initialized");
                return TTS_CONFIG_ERROR_INVALID_PARAMETER;
        }
 
@@ -2064,7 +2061,7 @@ int tts_config_mgr_get_max_text_size(unsigned int* size)
        tts_engine_info_s *engine_info = NULL;
 
        if (0 >= g_slist_length(g_engine_list)) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] There is no engine!!");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] There is no engine!!");
                return TTS_CONFIG_ERROR_ENGINE_NOT_FOUND;
        }
 
@@ -2075,7 +2072,7 @@ int tts_config_mgr_get_max_text_size(unsigned int* size)
                engine_info = iter->data;
 
                if (NULL == engine_info) {
-                       SLOG(LOG_ERROR, tts_tag(), "engine info is NULL");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "engine info is NULL");
                        return TTS_CONFIG_ERROR_OPERATION_FAILED;
                }
 
@@ -2088,13 +2085,12 @@ int tts_config_mgr_get_max_text_size(unsigned int* size)
        }
 
        if (NULL == engine_info) {
-               SLOG(LOG_ERROR, tts_tag(), "engine info is NULL");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "engine info is NULL");
                return TTS_CONFIG_ERROR_OPERATION_FAILED;
        }
 
        *size = engine_info->text_size;
-       SLOG(LOG_DEBUG, tts_tag(), "[DEBUG] Max text size is %d.", *size);
+       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[DEBUG] Max text size is %d.", *size);
 
        return 0;
 }
-
index e3bed83..42cfad0 100644 (file)
@@ -45,8 +45,6 @@
 
 #define TTS_MAX_TEXT_SIZE      2000
 
-extern char* tts_tag();
-
 static xmlDocPtr g_config_doc = NULL;
 char g_engine_id[128] = {0,};
 char g_setting[128] = {0,};
@@ -55,7 +53,7 @@ char g_language[128] = {0,};
 int tts_parser_get_engine_info(const char* path, tts_engine_info_s** engine_info)
 {
        if (NULL == path || NULL == engine_info) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Input parameter is NULL");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Input parameter is NULL");
                return -1;
        }
 
@@ -66,27 +64,27 @@ int tts_parser_get_engine_info(const char* path, tts_engine_info_s** engine_info
        xmlChar *attr = NULL;
 
        if (0 == access(path, F_OK)) {
-               SLOG(LOG_DEBUG, tts_tag(), "[DEBUG] Success to access to %s", path);
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[DEBUG] Success to access to %s", path);
                doc = xmlParseFile(path);
                if (doc == NULL) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to parse xml file");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to parse xml file");
                        return -1;
                }
        } else {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to access to %s", path);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to access to %s", path);
                return -1;
        }
 
        cur = xmlDocGetRootElement(doc);
        if (cur == NULL) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Empty document");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Empty document");
                xmlFreeDoc(doc);
                doc = NULL;
                return -1;
        }
 
        if (xmlStrcmp(cur->name, (const xmlChar *)TTS_TAG_ENGINE_BASE_TAG)) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] The wrong type, root node is NOT 'tts-engine'");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] The wrong type, root node is NOT 'tts-engine'");
                xmlFreeDoc(doc);
                doc = NULL;
                return -1;
@@ -94,7 +92,7 @@ int tts_parser_get_engine_info(const char* path, tts_engine_info_s** engine_info
 
        cur = cur->xmlChildrenNode;
        if (cur == NULL) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Empty document");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Empty document");
                xmlFreeDoc(doc);
                doc = NULL;
                return -1;
@@ -104,7 +102,7 @@ int tts_parser_get_engine_info(const char* path, tts_engine_info_s** engine_info
        tts_engine_info_s* temp;
        temp = (tts_engine_info_s*)calloc(1, sizeof(tts_engine_info_s));
        if (NULL == temp) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Out of memory");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Out of memory");
                xmlFreeDoc(doc);
                doc = NULL;
                return -1;
@@ -129,7 +127,7 @@ int tts_parser_get_engine_info(const char* path, tts_engine_info_s** engine_info
                                xmlFree(key);
                                key = NULL;
                        } else {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] <%s> has no content", TTS_TAG_ENGINE_NAME);
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] <%s> has no content", TTS_TAG_ENGINE_NAME);
                        }
                } else if (0 == xmlStrcmp(cur->name, (const xmlChar *)TTS_TAG_ENGINE_ID)) {
                        key = xmlNodeGetContent(cur);
@@ -142,7 +140,7 @@ int tts_parser_get_engine_info(const char* path, tts_engine_info_s** engine_info
                                xmlFree(key);
                                key = NULL;
                        } else {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] <%s> has no content", TTS_TAG_ENGINE_ID);
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] <%s> has no content", TTS_TAG_ENGINE_ID);
                        }
                } else if (0 == xmlStrcmp(cur->name, (const xmlChar *)TTS_TAG_ENGINE_SETTING)) {
                        key = xmlNodeGetContent(cur);
@@ -155,7 +153,7 @@ int tts_parser_get_engine_info(const char* path, tts_engine_info_s** engine_info
                                xmlFree(key);
                                key = NULL;
                        } else {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] <%s> has no content", TTS_TAG_ENGINE_SETTING);
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] <%s> has no content", TTS_TAG_ENGINE_SETTING);
                        }
                } else if (0 == xmlStrcmp(cur->name, (const xmlChar *)TTS_TAG_ENGINE_VOICE_SET)) {
                        xmlNodePtr voice_node = NULL;
@@ -165,7 +163,7 @@ int tts_parser_get_engine_info(const char* path, tts_engine_info_s** engine_info
                                if (0 == xmlStrcmp(voice_node->name, (const xmlChar *)TTS_TAG_ENGINE_VOICE)) {
                                        tts_config_voice_s* temp_voice = (tts_config_voice_s*)calloc(1, sizeof(tts_config_voice_s));
                                        if (NULL == temp_voice) {
-                                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Out of memory");
+                                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Out of memory");
                                                break;
                                        }
 
@@ -183,7 +181,7 @@ int tts_parser_get_engine_info(const char* path, tts_engine_info_s** engine_info
                                                xmlFree(attr);
                                                attr = NULL;
                                        } else {
-                                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] <%s> has no content", TTS_TAG_ENGINE_VOICE_TYPE);
+                                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] <%s> has no content", TTS_TAG_ENGINE_VOICE_TYPE);
                                                free(temp_voice);
                                                temp_voice = NULL;
                                                continue;
@@ -200,7 +198,7 @@ int tts_parser_get_engine_info(const char* path, tts_engine_info_s** engine_info
                                                key = NULL;
                                                temp->voices = g_slist_append(temp->voices, temp_voice);
                                        } else {
-                                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] <%s> has no content", TTS_TAG_ENGINE_VOICE);
+                                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] <%s> has no content", TTS_TAG_ENGINE_VOICE);
                                                if (NULL != temp_voice) {
                                                        free(temp_voice);
                                                        temp_voice = NULL;
@@ -218,7 +216,7 @@ int tts_parser_get_engine_info(const char* path, tts_engine_info_s** engine_info
                                xmlFree(key);
                                key = NULL;
                        } else {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] <%s> has no content", TTS_TAG_ENGINE_PITCH_SUPPORT);
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] <%s> has no content", TTS_TAG_ENGINE_PITCH_SUPPORT);
                        }
                } else if (0 == xmlStrcmp(cur->name, (const xmlChar *)TTS_TAG_ENGINE_TEXT_SIZE)) {
                        isTextsize = true;
@@ -227,7 +225,7 @@ int tts_parser_get_engine_info(const char* path, tts_engine_info_s** engine_info
                                temp->text_size = atoi((char*)key);
                                xmlFree(key);
                        } else {
-                               SLOG(LOG_INFO, tts_tag(), "[INFO] text size is unlimited.");
+                               SLOG(LOG_INFO, TAG_TTSCONFIG, "[INFO] text size is unlimited.");
                                temp->text_size = 0;
                        }
                }
@@ -243,7 +241,7 @@ int tts_parser_get_engine_info(const char* path, tts_engine_info_s** engine_info
 
        if (NULL == temp->uuid) {
                /* Invalid engine */
-               SECURE_SLOG(LOG_ERROR, tts_tag(), "[ERROR] Invalid engine : %s", path);
+               SECURE_SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Invalid engine : %s", path);
                tts_parser_free_engine_info(temp);
                return -1;
        }
@@ -256,7 +254,7 @@ int tts_parser_get_engine_info(const char* path, tts_engine_info_s** engine_info
 int tts_parser_free_engine_info(tts_engine_info_s* engine_info)
 {
        if (NULL == engine_info) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Input parameter is NULL");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Input parameter is NULL");
                return -1;
        }
 
@@ -301,17 +299,17 @@ int tts_parser_free_engine_info(tts_engine_info_s* engine_info)
 int tts_parser_print_engine_info(tts_engine_info_s* engine_info)
 {
        if (NULL == engine_info) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Input parameter is NULL");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Input parameter is NULL");
                return -1;
        }
 
-       SLOG(LOG_DEBUG, tts_tag(), "== get engine info ==");
-       SLOG(LOG_DEBUG, tts_tag(), " name : %s", engine_info->name);
-       SLOG(LOG_DEBUG, tts_tag(), " id   : %s", engine_info->uuid);
+       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "== get engine info ==");
+       SLOG(LOG_DEBUG, TAG_TTSCONFIG, " name : %s", engine_info->name);
+       SLOG(LOG_DEBUG, TAG_TTSCONFIG, " id   : %s", engine_info->uuid);
        if (NULL != engine_info->setting)
-               SLOG(LOG_DEBUG, tts_tag(), " setting : %s", engine_info->setting);
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, " setting : %s", engine_info->setting);
 
-       SLOG(LOG_DEBUG, tts_tag(), " voices");
+       SLOG(LOG_DEBUG, TAG_TTSCONFIG, " voices");
        GSList *iter = NULL;
        tts_config_voice_s *temp_voice;
 
@@ -324,7 +322,7 @@ int tts_parser_print_engine_info(tts_engine_info_s* engine_info)
                        /*Get handle data from list*/
                        temp_voice = iter->data;
 
-                       SLOG(LOG_DEBUG, tts_tag(), "  [%dth] type(%d) lang(%s)", 
+                       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "  [%dth] type(%d) lang(%s)", 
                                i, temp_voice->type, temp_voice->language);
 
                        /*Get next item*/
@@ -332,10 +330,10 @@ int tts_parser_print_engine_info(tts_engine_info_s* engine_info)
                        i++;
                }
        } else {
-               SLOG(LOG_ERROR, tts_tag(), "  Voice is NONE");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "  Voice is NONE");
        }
 
-       SLOG(LOG_DEBUG, tts_tag(), "@@@");
+       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "@@@");
 
        return 0;
 }
@@ -343,7 +341,7 @@ int tts_parser_print_engine_info(tts_engine_info_s* engine_info)
 int tts_parser_load_config(tts_config_s** config_info)
 {
        if (NULL == config_info) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Input parameter is NULL");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Input parameter is NULL");
                return -1;
        }
 
@@ -358,7 +356,7 @@ int tts_parser_load_config(tts_config_s** config_info)
        if (0 != access(TTS_CONFIG, F_OK)) {
                doc = xmlParseFile(TTS_DEFAULT_CONFIG);
                if (doc == NULL) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to parse file error : %s", TTS_DEFAULT_CONFIG);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to parse file error : %s", TTS_DEFAULT_CONFIG);
                        xmlCleanupParser();
                        return -1;
                }
@@ -375,10 +373,10 @@ int tts_parser_load_config(tts_config_s** config_info)
                        usleep(10000);
 
                        if (TTS_RETRY_COUNT == retry_count) {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to parse file error : %s", TTS_CONFIG);
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to parse file error : %s", TTS_CONFIG);
                                doc = xmlParseFile(TTS_DEFAULT_CONFIG);
                                if (NULL == doc) {
-                                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to parse file error : %s", TTS_DEFAULT_CONFIG);
+                                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to parse file error : %s", TTS_DEFAULT_CONFIG);
                                        xmlCleanupParser();
                                        return -1;
                                }
@@ -390,7 +388,7 @@ int tts_parser_load_config(tts_config_s** config_info)
 
        cur = xmlDocGetRootElement(doc);
        if (cur == NULL) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Empty document");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Empty document");
                xmlFreeDoc(doc);
                doc = NULL;
                xmlCleanupParser();
@@ -398,7 +396,7 @@ int tts_parser_load_config(tts_config_s** config_info)
        }
 
        if (xmlStrcmp(cur->name, (const xmlChar *) TTS_TAG_CONFIG_BASE_TAG)) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] The wrong type, root node is NOT %s", TTS_TAG_CONFIG_BASE_TAG);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] The wrong type, root node is NOT %s", TTS_TAG_CONFIG_BASE_TAG);
                xmlFreeDoc(doc);
                doc = NULL;
                xmlCleanupParser();
@@ -407,7 +405,7 @@ int tts_parser_load_config(tts_config_s** config_info)
 
        cur = cur->xmlChildrenNode;
        if (cur == NULL) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Empty document");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Empty document");
                xmlFreeDoc(doc);
                doc = NULL;
                xmlCleanupParser();
@@ -418,7 +416,7 @@ int tts_parser_load_config(tts_config_s** config_info)
        tts_config_s* temp;
        temp = (tts_config_s*)calloc(1, sizeof(tts_config_s));
        if (NULL == temp) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Out of memory");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Out of memory");
                xmlFreeDoc(doc);
                doc = NULL;
                xmlCleanupParser();
@@ -441,7 +439,7 @@ int tts_parser_load_config(tts_config_s** config_info)
                                xmlFree(key);
                                key = NULL;
                        } else {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] engine id is NULL");
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] engine id is NULL");
                        }
                } else if (0 == xmlStrcmp(cur->name, (const xmlChar *)TTS_TAG_CONFIG_ENGINE_SETTING)) {
                        key = xmlNodeGetContent(cur);
@@ -450,7 +448,7 @@ int tts_parser_load_config(tts_config_s** config_info)
                                xmlFree(key);
                                key = NULL;
                        } else {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] setting path is NULL");
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] setting path is NULL");
                        }
                } else if (0 == xmlStrcmp(cur->name, (const xmlChar *)TTS_TAG_CONFIG_AUTO_VOICE)) {
                        key = xmlNodeGetContent(cur);
@@ -460,14 +458,14 @@ int tts_parser_load_config(tts_config_s** config_info)
                                } else if (0 == xmlStrcmp(key, (const xmlChar *)"off")) {
                                        temp->auto_voice = false;
                                } else {
-                                       SLOG(LOG_ERROR, tts_tag(), "Auto voice is wrong");
+                                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "Auto voice is wrong");
                                        temp->auto_voice = true;
                                }
 
                                xmlFree(key);
                                key = NULL;
                        } else {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] voice type is NULL");
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] voice type is NULL");
                        }
                } else if (0 == xmlStrcmp(cur->name, (const xmlChar *)TTS_TAG_CONFIG_VOICE_TYPE)) {
                        key = xmlNodeGetContent(cur);
@@ -479,14 +477,14 @@ int tts_parser_load_config(tts_config_s** config_info)
                                } else if (0 == xmlStrcmp(key, (const xmlChar *)TTS_TAG_VOICE_TYPE_CHILD)) {
                                        temp->type = (int)TTS_CONFIG_VOICE_TYPE_CHILD;
                                } else {
-                                       SLOG(LOG_WARN, tts_tag(), "Voice type is user defined");
+                                       SLOG(LOG_WARN, TAG_TTSCONFIG, "Voice type is user defined");
                                        temp->type = (int)TTS_CONFIG_VOICE_TYPE_USER_DEFINED;
                                }
 
                                xmlFree(key);
                                key = NULL;
                        } else {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] voice type is NULL");
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] voice type is NULL");
                        }
                } else if (0 == xmlStrcmp(cur->name, (const xmlChar *)TTS_TAG_CONFIG_LANGUAGE)) {
                        key = xmlNodeGetContent(cur);
@@ -495,7 +493,7 @@ int tts_parser_load_config(tts_config_s** config_info)
                                xmlFree(key);
                                key = NULL;
                        } else {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] engine uuid is NULL");
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] engine uuid is NULL");
                        }
 
                } else if (0 == xmlStrcmp(cur->name, (const xmlChar *)TTS_TAG_CONFIG_SPEECH_RATE)) {
@@ -504,7 +502,7 @@ int tts_parser_load_config(tts_config_s** config_info)
                                temp->speech_rate = atoi((char*)key);
                                xmlFree(key);
                        } else {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] speech rate is NULL");
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] speech rate is NULL");
                        }
                } else if (0 == xmlStrcmp(cur->name, (const xmlChar *)TTS_TAG_CONFIG_PITCH)) {
                        key = xmlNodeGetContent(cur);
@@ -513,7 +511,7 @@ int tts_parser_load_config(tts_config_s** config_info)
                                xmlFree(key);
                                key = NULL;
                        } else {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Pitch is NULL");
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Pitch is NULL");
                        }
                } else {
 
@@ -536,21 +534,21 @@ int tts_parser_load_config(tts_config_s** config_info)
                        usleep(10000);
 
                        if (TTS_RETRY_COUNT == retry_count) {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Save result : %d", ret);
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Save result : %d", ret);
                                return -1;
                        }
                } while (0 != ret);
 
                /* Set mode */
                if (0 > chmod(TTS_CONFIG, 0600)) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to change file mode : %d", ret);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to change file mode : %d", ret);
                }
 
                /* Set owner */
                if (0 > chown(TTS_CONFIG, 5000, 5000)) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to change file owner : %d", ret);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to change file owner : %d", ret);
                }
-               SLOG(LOG_DEBUG, tts_tag(), "Default config is changed : pid(%d)", getpid());
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Default config is changed : pid(%d)", getpid());
        }
 
        return 0;
@@ -576,49 +574,49 @@ int tts_parser_unload_config(tts_config_s* config_info)
 int tts_parser_copy_xml(const char* original, const char* destination)
 {
        if (NULL == original || NULL == destination) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Input parameter is NULL");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Input parameter is NULL");
                return -1;
        }
 
        xmlDocPtr doc = NULL;
        if (0 == access(original, F_OK)) {
-               SLOG(LOG_DEBUG, tts_tag(), "[DEBUG] Success to access to %s", original);
+               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[DEBUG] Success to access to %s", original);
                doc = xmlParseFile(original);
                if (doc == NULL) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to parse file error : %s", original);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to parse file error : %s", original);
                        return -1;
                }
        } else {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to access to %s", original);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to access to %s", original);
                return -1;
        }
 
        int ret = xmlSaveFile(destination, doc);
        if (0 > ret) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Save result : %d", ret);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Save result : %d", ret);
        } else {
                static FILE* pFile;
                pFile = fopen(destination, "r");
                int fd = -1;
                if (NULL == pFile) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to open file %s", destination);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to open file %s", destination);
                } else {
                        fd = fileno(pFile);
                        fsync(fd);
                        fclose(pFile);
-                       SLOG(LOG_INFO, tts_tag(), "[DEBUG] Success to fsync %s", destination);
+                       SLOG(LOG_INFO, TAG_TTSCONFIG, "[DEBUG] Success to fsync %s", destination);
                }
-               SLOG(LOG_ERROR, tts_tag(), "[DEBUG] Success to save %s", destination);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[DEBUG] Success to save %s", destination);
        }
 
        /* Set mode */
        if (0 > chmod(destination, 0600)) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to change file mode : %d", ret);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to change file mode : %d", ret);
        }
 
        xmlFreeDoc(doc);
        doc = NULL;
-       SLOG(LOG_DEBUG, tts_tag(), "[SUCCESS] Copying xml");
+       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[SUCCESS] Copying xml");
 
        return 0;
 }
@@ -626,25 +624,25 @@ int tts_parser_copy_xml(const char* original, const char* destination)
 int tts_parser_set_engine(const char* engine_id, const char* setting, const char* language, int type)
 {
        if (NULL == engine_id) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Input parameter is NULL");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Input parameter is NULL");
                return -1;
        }
 
        xmlNodePtr cur = NULL;
        cur = xmlDocGetRootElement(g_config_doc);
        if (cur == NULL) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Empty document");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Empty document");
                return -1;
        }
 
        if (xmlStrcmp(cur->name, (const xmlChar *) TTS_TAG_CONFIG_BASE_TAG)) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] The wrong type, root node is NOT %s", TTS_TAG_CONFIG_BASE_TAG);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] The wrong type, root node is NOT %s", TTS_TAG_CONFIG_BASE_TAG);
                return -1;
        }
 
        cur = cur->xmlChildrenNode;
        if (cur == NULL) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Empty document");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Empty document");
                return -1;
        }
 
@@ -676,23 +674,23 @@ int tts_parser_set_engine(const char* engine_id, const char* setting, const char
        if (0 == access(TTS_CONFIG, F_OK)) {
                int ret = xmlSaveFile(TTS_CONFIG, g_config_doc);
                if (0 > ret) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Save result : %d", ret);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Save result : %d", ret);
                } else {
                        static FILE* pFile;
                        pFile = fopen(TTS_CONFIG, "r");
                        int fd = -1;
                        if (NULL == pFile) {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to open file %s", TTS_CONFIG);
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to open file %s", TTS_CONFIG);
                        } else {
                                fd = fileno(pFile);
                                fsync(fd);
                                fclose(pFile);
-                               SLOG(LOG_INFO, tts_tag(), "[DEBUG] Success to fsync %s", TTS_CONFIG);
+                               SLOG(LOG_INFO, TAG_TTSCONFIG, "[DEBUG] Success to fsync %s", TTS_CONFIG);
                        }
-                       SLOG(LOG_ERROR, tts_tag(), "[DEBUG] Success to save %s", TTS_CONFIG);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[DEBUG] Success to save %s", TTS_CONFIG);
                }
        } else {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to access to %s", TTS_CONFIG);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to access to %s", TTS_CONFIG);
        }
 
        return 0;
@@ -701,25 +699,25 @@ int tts_parser_set_engine(const char* engine_id, const char* setting, const char
 int tts_parser_set_voice(const char* language, int type)
 {
        if (NULL == language) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Input parameter is NULL");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Input parameter is NULL");
                return -1;
        }
 
        xmlNodePtr cur = NULL;
        cur = xmlDocGetRootElement(g_config_doc);
        if (cur == NULL) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Empty document");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Empty document");
                return -1;
        }
 
        if (xmlStrcmp(cur->name, (const xmlChar *) TTS_TAG_CONFIG_BASE_TAG)) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] The wrong type, root node is NOT %s", TTS_TAG_CONFIG_BASE_TAG);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] The wrong type, root node is NOT %s", TTS_TAG_CONFIG_BASE_TAG);
                return -1;
        }
 
        cur = cur->xmlChildrenNode;
        if (cur == NULL) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Empty document");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Empty document");
                return -1;
        }
 
@@ -734,7 +732,7 @@ int tts_parser_set_voice(const char* language, int type)
                        case TTS_CONFIG_VOICE_TYPE_FEMALE:      xmlNodeSetContent(cur, (const xmlChar*)TTS_TAG_VOICE_TYPE_FEMALE);      break;
                        case TTS_CONFIG_VOICE_TYPE_CHILD:       xmlNodeSetContent(cur, (const xmlChar*)TTS_TAG_VOICE_TYPE_CHILD);       break;
                        default:
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Invalid type : %d", type);
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Invalid type : %d", type);
                                xmlNodeSetContent(cur, (const xmlChar*)TTS_TAG_VOICE_TYPE_FEMALE);
                                break;
                        }
@@ -746,23 +744,23 @@ int tts_parser_set_voice(const char* language, int type)
        if (0 == access(TTS_CONFIG, F_OK)) {
                int ret = xmlSaveFile(TTS_CONFIG, g_config_doc);
                if (0 > ret) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Save result : %d", ret);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Save result : %d", ret);
                } else {
                        static FILE* pFile;
                        pFile = fopen(TTS_CONFIG, "r");
                        int fd = -1;
                        if (NULL == pFile) {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to open file %s", TTS_CONFIG);
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to open file %s", TTS_CONFIG);
                        } else {
                                fd = fileno(pFile);
                                fsync(fd);
                                fclose(pFile);
-                               SLOG(LOG_INFO, tts_tag(), "[DEBUG] Success to fsync %s", TTS_CONFIG);
+                               SLOG(LOG_INFO, TAG_TTSCONFIG, "[DEBUG] Success to fsync %s", TTS_CONFIG);
                        }
-                       SLOG(LOG_ERROR, tts_tag(), "[DEBUG] Success to save %s", TTS_CONFIG);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[DEBUG] Success to save %s", TTS_CONFIG);
                }
        } else {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to access to %s", TTS_CONFIG);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to access to %s", TTS_CONFIG);
        }
        return 0;
 }
@@ -772,18 +770,18 @@ int tts_parser_set_auto_voice(bool value)
        xmlNodePtr cur = NULL;
        cur = xmlDocGetRootElement(g_config_doc);
        if (cur == NULL) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Empty document");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Empty document");
                return -1;
        }
 
        if (xmlStrcmp(cur->name, (const xmlChar *) TTS_TAG_CONFIG_BASE_TAG)) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] The wrong type, root node is NOT %s", TTS_TAG_CONFIG_BASE_TAG);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] The wrong type, root node is NOT %s", TTS_TAG_CONFIG_BASE_TAG);
                return -1;
        }
 
        cur = cur->xmlChildrenNode;
        if (cur == NULL) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Empty document");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Empty document");
                return -1;
        }
 
@@ -794,7 +792,7 @@ int tts_parser_set_auto_voice(bool value)
                        } else if (false == value) {
                                xmlNodeSetContent(cur, (const xmlChar *)"off");
                        } else {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] The wrong value of auto voice");
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] The wrong value of auto voice");
                                return -1;
                        }
                        break;
@@ -805,23 +803,23 @@ int tts_parser_set_auto_voice(bool value)
        if (0 == access(TTS_CONFIG, F_OK)) {
                int ret = xmlSaveFile(TTS_CONFIG, g_config_doc);
                if (0 > ret) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Save result : %d", ret);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Save result : %d", ret);
                } else {
                        static FILE* pFile;
                        pFile = fopen(TTS_CONFIG, "r");
                        int fd = -1;
                        if (NULL == pFile) {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to open file %s", TTS_CONFIG);
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to open file %s", TTS_CONFIG);
                        } else {
                                fd = fileno(pFile);
                                fsync(fd);
                                fclose(pFile);
-                               SLOG(LOG_INFO, tts_tag(), "[DEBUG] Success to fsync %s", TTS_CONFIG);
+                               SLOG(LOG_INFO, TAG_TTSCONFIG, "[DEBUG] Success to fsync %s", TTS_CONFIG);
                        }
-                       SLOG(LOG_ERROR, tts_tag(), "[DEBUG] Success to save %s", TTS_CONFIG);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[DEBUG] Success to save %s", TTS_CONFIG);
                }
        } else {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to access to %s", TTS_CONFIG);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to access to %s", TTS_CONFIG);
        }
 
        return 0;
@@ -832,18 +830,18 @@ int tts_parser_set_speech_rate(int value)
        xmlNodePtr cur = NULL;
        cur = xmlDocGetRootElement(g_config_doc);
        if (cur == NULL) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Empty document");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Empty document");
                return -1;
        }
 
        if (xmlStrcmp(cur->name, (const xmlChar *) TTS_TAG_CONFIG_BASE_TAG)) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] The wrong type, root node is NOT %s", TTS_TAG_CONFIG_BASE_TAG);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] The wrong type, root node is NOT %s", TTS_TAG_CONFIG_BASE_TAG);
                return -1;
        }
 
        cur = cur->xmlChildrenNode;
        if (cur == NULL) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Empty document");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Empty document");
                return -1;
        }
 
@@ -855,7 +853,7 @@ int tts_parser_set_speech_rate(int value)
 
                        xmlNodeSetContent(cur, (const xmlChar *)temp);
 
-                       SLOG(LOG_DEBUG, tts_tag(), "Set speech rate : %s", temp);
+                       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Set speech rate : %s", temp);
                        break;
                }
 
@@ -865,23 +863,23 @@ int tts_parser_set_speech_rate(int value)
        if (0 == access(TTS_CONFIG, F_OK)) {
                int ret = xmlSaveFile(TTS_CONFIG, g_config_doc);
                if (0 > ret) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Save result : %d", ret);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Save result : %d", ret);
                } else {
                        static FILE* pFile;
                        pFile = fopen(TTS_CONFIG, "r");
                        int fd = -1;
                        if (NULL == pFile) {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to open file %s", TTS_CONFIG);
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to open file %s", TTS_CONFIG);
                        } else {
                                fd = fileno(pFile);
                                fsync(fd);
                                fclose(pFile);
-                               SLOG(LOG_INFO, tts_tag(), "[DEBUG] Success to fsync %s", TTS_CONFIG);
+                               SLOG(LOG_INFO, TAG_TTSCONFIG, "[DEBUG] Success to fsync %s", TTS_CONFIG);
                        }
-                       SLOG(LOG_ERROR, tts_tag(), "[DEBUG] Success to save %s", TTS_CONFIG);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[DEBUG] Success to save %s", TTS_CONFIG);
                }
        } else {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to access to %s", TTS_CONFIG);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to access to %s", TTS_CONFIG);
        }
 
        return 0;
@@ -892,18 +890,18 @@ int tts_parser_set_pitch(int value)
        xmlNodePtr cur = NULL;
        cur = xmlDocGetRootElement(g_config_doc);
        if (cur == NULL) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Empty document");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Empty document");
                return -1;
        }
 
        if (xmlStrcmp(cur->name, (const xmlChar *) TTS_TAG_CONFIG_BASE_TAG)) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] The wrong type, root node is NOT %s", TTS_TAG_CONFIG_BASE_TAG);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] The wrong type, root node is NOT %s", TTS_TAG_CONFIG_BASE_TAG);
                return -1;
        }
 
        cur = cur->xmlChildrenNode;
        if (cur == NULL) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Empty document");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Empty document");
                return -1;
        }
 
@@ -922,23 +920,23 @@ int tts_parser_set_pitch(int value)
        if (0 == access(TTS_CONFIG, F_OK)) {
                int ret = xmlSaveFile(TTS_CONFIG, g_config_doc);
                if (0 > ret) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Save result : %d", ret);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Save result : %d", ret);
                } else {
                        static FILE* pFile;
                        pFile = fopen(TTS_CONFIG, "r");
                        int fd = -1;
                        if (NULL == pFile) {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to open file %s", TTS_CONFIG);
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to open file %s", TTS_CONFIG);
                        } else {
                                fd = fileno(pFile);
                                fsync(fd);
                                fclose(pFile);
-                               SLOG(LOG_INFO, tts_tag(), "[DEBUG] Success to fsync %s", TTS_CONFIG);
+                               SLOG(LOG_INFO, TAG_TTSCONFIG, "[DEBUG] Success to fsync %s", TTS_CONFIG);
                        }
-                       SLOG(LOG_ERROR, tts_tag(), "[DEBUG] Success to save %s", TTS_CONFIG);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[DEBUG] Success to save %s", TTS_CONFIG);
                }
        } else {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to access to %s", TTS_CONFIG);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to access to %s", TTS_CONFIG);
        }
 
        return 0;
@@ -948,7 +946,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
                                   int* speech_rate, int* pitch)
 {
        if (NULL == engine || NULL == setting || NULL == language || NULL == voice_type || NULL == speech_rate) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Input parameter is NULL");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Input parameter is NULL");
                return -1;
        }
 
@@ -962,7 +960,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
        int retry_count = 0;
        while (NULL == doc) {
                if (0 == access(TTS_CONFIG, F_OK)) {
-                       SLOG(LOG_DEBUG, tts_tag(), "[DEBUG] Success to access to %s", TTS_CONFIG);
+                       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[DEBUG] Success to access to %s", TTS_CONFIG);
                        doc = xmlParseFile(TTS_CONFIG);
                        if (NULL != doc) {
                                break;
@@ -972,7 +970,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
                usleep(10000);
 
                if (TTS_RETRY_COUNT == retry_count) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to parse file error : %s", TTS_CONFIG);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to parse file error : %s", TTS_CONFIG);
                        return -1;
                }
        }
@@ -980,7 +978,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
        cur_new = xmlDocGetRootElement(doc);
        cur_old = xmlDocGetRootElement(g_config_doc);
        if (cur_new == NULL || cur_old == NULL) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Empty document");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Empty document");
                xmlFreeDoc(doc);
                doc = NULL;
                return -1;
@@ -988,7 +986,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
 
        if (xmlStrcmp(cur_new->name, (const xmlChar*)TTS_TAG_CONFIG_BASE_TAG) || 
        xmlStrcmp(cur_old->name, (const xmlChar*)TTS_TAG_CONFIG_BASE_TAG)) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] The wrong type, root node is NOT %s", TTS_TAG_CONFIG_BASE_TAG);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] The wrong type, root node is NOT %s", TTS_TAG_CONFIG_BASE_TAG);
                xmlFreeDoc(doc);
                doc = NULL;
                return -1;
@@ -997,7 +995,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
        cur_new = cur_new->xmlChildrenNode;
        cur_old = cur_old->xmlChildrenNode;
        if (cur_new == NULL || cur_old == NULL) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Empty document");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Empty document");
                xmlFreeDoc(doc);
                doc = NULL;
                return -1;
@@ -1011,7 +1009,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
                                        key_new = xmlNodeGetContent(cur_new);
                                        if (NULL != key_new) {
                                                if (0 != xmlStrcmp(key_old, key_new)) {
-                                                       SLOG(LOG_DEBUG, tts_tag(), "Old engine id(%s), New engine(%s)", 
+                                                       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Old engine id(%s), New engine(%s)", 
                                                                (char*)key_old, (char*)key_new);
                                                        if (NULL != *engine) {
                                                                free(*engine);
@@ -1026,7 +1024,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
                                        key_old = NULL;
                                }
                        } else {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] old config and new config are different");
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] old config and new config are different");
                        }
                } else if (0 == xmlStrcmp(cur_new->name, (const xmlChar*)TTS_TAG_CONFIG_ENGINE_SETTING)) {
                        if (0 == xmlStrcmp(cur_old->name, (const xmlChar*)TTS_TAG_CONFIG_ENGINE_SETTING)) {
@@ -1035,7 +1033,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
                                        key_new = xmlNodeGetContent(cur_new);
                                        if (NULL != key_new) {
                                                if (0 != xmlStrcmp(key_old, key_new)) {
-                                                       SLOG(LOG_DEBUG, tts_tag(), "Old engine setting(%s), New engine setting(%s)", 
+                                                       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Old engine setting(%s), New engine setting(%s)", 
                                                                (char*)key_old, (char*)key_new);
                                                        if (NULL != *setting) {
                                                                free(*setting);
@@ -1050,7 +1048,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
                                        key_old = NULL;
                                }
                        } else {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] old config and new config are different");
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] old config and new config are different");
                        }
                } else if (0 == xmlStrcmp(cur_new->name, (const xmlChar*)TTS_TAG_CONFIG_AUTO_VOICE)) {
                        if (0 == xmlStrcmp(cur_old->name, (const xmlChar*)TTS_TAG_CONFIG_AUTO_VOICE)) {
@@ -1059,7 +1057,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
                                        key_new = xmlNodeGetContent(cur_new);
                                        if (NULL != key_new) {
                                                if (0 != xmlStrcmp(key_old, key_new)) {
-                                                       SLOG(LOG_DEBUG, tts_tag(), "Old auto voice (%s), New auto voice(%s)", 
+                                                       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Old auto voice (%s), New auto voice(%s)", 
                                                                (char*)key_old, (char*)key_new);
                                                        if (0 == xmlStrcmp((const xmlChar*)"on", key_new)) {
                                                                *auto_voice = true;
@@ -1074,7 +1072,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
                                        key_old = NULL;
                                }
                        } else {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] old config and new config are different");
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] old config and new config are different");
                        }
                } else if (0 == xmlStrcmp(cur_new->name, (const xmlChar*)TTS_TAG_CONFIG_LANGUAGE)) {
                        if (0 == xmlStrcmp(cur_old->name, (const xmlChar*)TTS_TAG_CONFIG_LANGUAGE)) {
@@ -1083,7 +1081,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
                                        key_new = xmlNodeGetContent(cur_new);
                                        if (NULL != key_new) {
                                                if (0 != xmlStrcmp(key_old, key_new)) {
-                                                       SLOG(LOG_DEBUG, tts_tag(), "Old language(%s), New language(%s)", 
+                                                       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Old language(%s), New language(%s)", 
                                                                (char*)key_old, (char*)key_new);
                                                        if (NULL != *language) {
                                                                free(*language);
@@ -1098,7 +1096,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
                                        key_old = NULL;
                                }
                        } else {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] old config and new config are different");
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] old config and new config are different");
                        }
                } else if (0 == xmlStrcmp(cur_new->name, (const xmlChar*)TTS_TAG_CONFIG_VOICE_TYPE)) {
                        if (0 == xmlStrcmp(cur_old->name, (const xmlChar*)TTS_TAG_CONFIG_VOICE_TYPE)) {
@@ -1107,7 +1105,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
                                        key_new = xmlNodeGetContent(cur_new);
                                        if (NULL != key_new) {
                                                if (0 != xmlStrcmp(key_old, key_new)) {
-                                                       SLOG(LOG_DEBUG, tts_tag(), "Old voice type(%s), New voice type(%s)", 
+                                                       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Old voice type(%s), New voice type(%s)", 
                                                                (char*)key_old, (char*)key_new);
                                                        if (0 == xmlStrcmp(key_new, (const xmlChar *)TTS_TAG_VOICE_TYPE_FEMALE)) {
                                                                *voice_type = (int)TTS_CONFIG_VOICE_TYPE_FEMALE;
@@ -1116,7 +1114,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
                                                        } else if (0 == xmlStrcmp(key_new, (const xmlChar *)TTS_TAG_VOICE_TYPE_CHILD)) {
                                                                *voice_type = (int)TTS_CONFIG_VOICE_TYPE_CHILD;
                                                        } else {
-                                                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] New voice type is not valid");
+                                                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] New voice type is not valid");
                                                        }
                                                }
                                                xmlFree(key_new);
@@ -1126,7 +1124,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
                                        key_old = NULL;
                                }
                        } else {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] old config and new config are different");
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] old config and new config are different");
                        }
                } else if (0 == xmlStrcmp(cur_new->name, (const xmlChar*)TTS_TAG_CONFIG_SPEECH_RATE)) {
                        if (0 == xmlStrcmp(cur_old->name, (const xmlChar*)TTS_TAG_CONFIG_SPEECH_RATE)) {
@@ -1135,7 +1133,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
                                        key_new = xmlNodeGetContent(cur_new);
                                        if (NULL != key_new) {
                                                if (0 != xmlStrcmp(key_old, key_new)) {
-                                                       SLOG(LOG_DEBUG, tts_tag(), "Old speech rate(%s), New speech rate(%s)", 
+                                                       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Old speech rate(%s), New speech rate(%s)", 
                                                                (char*)key_old, (char*)key_new);
                                                        *speech_rate = atoi((char*)key_new);
                                                }
@@ -1146,7 +1144,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
                                        key_old = NULL;
                                }
                        } else {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] old config and new config are different");
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] old config and new config are different");
                        }
                } else if (0 == xmlStrcmp(cur_new->name, (const xmlChar*)TTS_TAG_CONFIG_PITCH)) {
                        if (0 == xmlStrcmp(cur_old->name, (const xmlChar*)TTS_TAG_CONFIG_PITCH)) {
@@ -1155,7 +1153,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
                                        key_new = xmlNodeGetContent(cur_new);
                                        if (NULL != key_new) {
                                                if (0 != xmlStrcmp(key_old, key_new)) {
-                                                       SLOG(LOG_DEBUG, tts_tag(), "Old pitch(%s), New pitch(%s)", 
+                                                       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Old pitch(%s), New pitch(%s)", 
                                                                (char*)key_old, (char*)key_new);
                                                        *pitch = atoi((char*)key_new);
                                                }
@@ -1166,7 +1164,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
                                        key_old = NULL;
                                }
                        } else {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] old config and new config are different");
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] old config and new config are different");
                        }
                } else {
 
@@ -1187,7 +1185,7 @@ int tts_parser_find_config_changed(char** engine, char**setting, bool* auto_voic
 
 int tts_parser_reset()
 {
-       SLOG(LOG_DEBUG, tts_tag(), "[DEBUG] Reset g_config_doc as %s", TTS_DEFAULT_CONFIG);
+       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[DEBUG] Reset g_config_doc as %s", TTS_DEFAULT_CONFIG);
 
        if (NULL != g_config_doc) {
                xmlFreeDoc(g_config_doc);
@@ -1196,30 +1194,30 @@ int tts_parser_reset()
 
        g_config_doc = xmlParseFile(TTS_DEFAULT_CONFIG);
        if (NULL == g_config_doc) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to parse %s", TTS_DEFAULT_CONFIG);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to parse %s", TTS_DEFAULT_CONFIG);
                return -1;
        }
 
        if (0 == access(TTS_CONFIG, F_OK)) {
                int ret = xmlSaveFile(TTS_CONFIG, g_config_doc);
                if (0 > ret) {
-                       SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to save %s", TTS_CONFIG);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to save %s", TTS_CONFIG);
                } else {
                        static FILE* pFile;
                        pFile = fopen(TTS_CONFIG, "r");
                        int fd = -1;
                        if (NULL == pFile) {
-                               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to open file %s", TTS_CONFIG);
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to open file %s", TTS_CONFIG);
                        } else {
                                fd = fileno(pFile);
                                fsync(fd);
                                fclose(pFile);
-                               SLOG(LOG_INFO, tts_tag(), "[DEBUG] Success to fsync %s", TTS_CONFIG);
+                               SLOG(LOG_INFO, TAG_TTSCONFIG, "[DEBUG] Success to fsync %s", TTS_CONFIG);
                        }
-                       SLOG(LOG_ERROR, tts_tag(), "[DEBUG] Success to save %s", TTS_CONFIG);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[DEBUG] Success to save %s", TTS_CONFIG);
                }
        } else {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to access to %s", TTS_CONFIG);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to access to %s", TTS_CONFIG);
        }
 
        return 0;
index 1538673..32afeb7 100644 (file)
@@ -117,6 +117,13 @@ extern "C" {
 
 #define TTS_ENGINE_DB_DEFAULT       "db/voice/tts/engine/default"
 
+
+/******************************************************************************************
+* Defines for log tag
+*******************************************************************************************/
+#define TAG_TTSCONFIG  "ttsconfig"
+
+
 #ifdef __cplusplus
 }
 #endif