add or change logs for detecting detailed log 63/319663/2 accepted/tizen_unified tizen accepted/tizen/unified/20241031.164453
authordyamy-lee <dyamy.lee@samsung.com>
Tue, 29 Oct 2024 13:48:46 +0000 (22:48 +0900)
committersooyeon <sooyeon.kim@samsung.com>
Wed, 30 Oct 2024 08:48:17 +0000 (17:48 +0900)
Change-Id: I1114a7fe93411e238f9f0eb73fe56db728007ced

common/tts_config_mgr.c
common/tts_config_parser.c
server/ttsd_engine_agent.c
server/ttsd_server.c

index 21bfdd5..4f05744 100644 (file)
@@ -102,6 +102,8 @@ static char* get_default_engine_app_id()
                engine_name = strdup(TTS_SERVER_ENGINE_DEFAULT);
        }
 
+       SLOG(LOG_ERROR, TAG_TTSC, "[INFO] Current default engine (%s)", engine_name);
+
        return engine_name;
 }
 
@@ -112,6 +114,8 @@ static tts_engine_info_s* __get_engine_info(const char* engine_id)
                return NULL;
        }
 
+       SLOG(LOG_ERROR, TAG_TTSC, "[INFO] Get engine info (%s)", engine_id);
+
        for (GSList* iter = g_slist_nth(g_engine_list, 0); NULL != iter; iter = g_slist_next(iter)) {
                tts_engine_info_s* engine_info = iter->data;
                if (NULL == engine_info) {
@@ -140,6 +144,8 @@ static tts_config_voice_s* __get_voice_info(tts_engine_info_s* engine_info, cons
                return NULL;
        }
 
+       SLOG(LOG_ERROR, TAG_TTSC, "[INFO] Get voice info. language(%s), voice type(%d)", language, voice_type);
+
        for (GSList* iter = g_slist_nth(engine_info->voices, 0); NULL != iter; iter = g_slist_next(iter)) {
                tts_config_voice_s* voice = iter->data;
                if (NULL == voice) {
@@ -152,7 +158,7 @@ static tts_config_voice_s* __get_voice_info(tts_engine_info_s* engine_info, cons
                }
 
                if (TTS_CONFIG_VOICE_TYPE_NONE == voice_type || voice_type == voice->type) {
-                       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Success to find voice : %s, %d", language, voice_type);
+                       SLOG(LOG_INFO, TAG_TTSCONFIG, "Success to find voice : %s, %d", language, voice_type);
                        return voice;
                }
        }
@@ -184,6 +190,8 @@ static void set_voice_into_config(tts_config_s* config_info, const char* languag
        if (TTS_CONFIG_VOICE_TYPE_NONE != voice_type) {
                config_info->type = voice_type;
        }
+
+       SLOG(LOG_ERROR, TAG_TTSC, "[INFO] Set voice into config info. language(%s), voice type(%d)", config_info->language, config_info->type);
 }
 
 int __tts_config_mgr_check_engine_is_valid(const char* engine_id)
@@ -194,7 +202,7 @@ int __tts_config_mgr_check_engine_is_valid(const char* engine_id)
        }
 
        if (0 >= g_slist_length(g_engine_list)) {
-               SLOG(LOG_ERROR, TAG_TTSCONFIG, "There is no engine!!");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "There is no engine(%s)!!", engine_id);
                return TTS_CONFIG_ERROR_ENGINE_NOT_FOUND;
        }
 
@@ -223,6 +231,7 @@ int __tts_config_mgr_check_engine_is_valid(const char* engine_id)
 
                if (NULL != engine_info->uuid) {
                        vconf_set_str(TTS_ENGINE_DB_DEFAULT, engine_info->uuid);
+                       SLOG(LOG_INFO, TAG_TTSCONFIG, "[INFO] Change the default engine as a valid engine(%s)", engine_info->uuid);
                }
        }
 
@@ -243,7 +252,7 @@ int __tts_config_mgr_check_engine_is_valid(const char* engine_id)
                strncpy(config_info.setting, engine_info->setting, sizeof(g_setting) - 1);
        }
 
-       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Default engine is changed : %s", config_info.engine_id);
+       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Default engine is changed : %s", config_info.engine_id);
 
        /* Change is default voice */
        tts_config_voice_s* voice = __get_voice_info(engine_info, config_info.language, config_info.type);
@@ -258,7 +267,7 @@ int __tts_config_mgr_check_engine_is_valid(const char* engine_id)
        }
 
        set_voice_into_config(&config_info, voice->language, voice->type);
-       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Default voice is changed : lang(%s) type(%d)", voice->language, voice->type);
+       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Default voice is changed : lang(%s) type(%d)", voice->language, voice->type);
 
        if (__is_client_type(TTS_CONFIG_CLIENT_TYPE_SETTING | TTS_CONFIG_CLIENT_TYPE_SERVER | TTS_CONFIG_CLIENT_TYPE_INTERRUPT)) {
                if (0 != tts_parser_set_engine(config_info.engine_id, config_info.setting, config_info.language, config_info.type)) {
@@ -289,6 +298,8 @@ bool __tts_config_mgr_check_lang_is_valid(const char* engine_id, const char* lan
                return false;
        }
 
+       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] engine_id(%s), language(%s), type(%d)", engine_id, language, type);
+
        tts_engine_info_s *engine_info = __get_engine_info(engine_id);
        if (NULL == engine_info) {
                SLOG(LOG_ERROR, TAG_TTSCONFIG, "engine info is NULL");
@@ -339,7 +350,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, TAG_TTSCONFIG, "Selected language(%s) type(%d)", *language, *type);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Selected language(%s) type(%d)", *language, *type);
                return TTS_CONFIG_ERROR_NONE;
        }
 
@@ -380,7 +391,7 @@ static Eina_Bool invoke_engine_changed_event_by_idler(void *data)
        engine_changed_cb_parameter_s *params = (engine_changed_cb_parameter_s *)data;
        if (NULL != params) {
                SLOG(LOG_DEBUG, TAG_TTSCONFIG, "@@@ Config changed callback event");
-               SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Engine change(%s)", params->engine_id);
+               SECURE_SLOG(LOG_ERROR, TAG_TTSCONFIG, "Engine change(%s)", params->engine_id);
 
                g_slist_foreach(g_config_client_list, invoke_engine_changed_cb, params);
                release_engine_changed_cb_params(params);
@@ -439,6 +450,8 @@ static void invoke_voice_changed_cb(gpointer data, gpointer user_data)
                return;
        }
 
+       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Voice changed callback. before_language(%s), before_voice_type(%d), current_language(%s), current_voice_type(%d), auto_voice(%d)", params->before_language, params->before_voice_type, params->current_language, params->current_voice_type, params->auto_voice);
+
        if (NULL != client->voice_cb) {
                SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Voice changed callback : uid(%u)", client->uid);
                client->voice_cb(params->before_language, params->before_voice_type, params->current_language,
@@ -451,7 +464,7 @@ static Eina_Bool invoke_voice_changed_event_by_idler(void *data)
        voice_changed_cb_parameter_s *params = (voice_changed_cb_parameter_s *)data;
        if (NULL != params) {
                SLOG(LOG_DEBUG, TAG_TTSCONFIG, "@@@ Config changed callback event");
-               SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Voice change(%s, %d)", params->current_language, params->current_voice_type);
+               SECURE_SLOG(LOG_ERROR, TAG_TTSCONFIG, "[DEBUG] Voice change from(%s, %d) to(%s, %d)", params->before_language, params->before_voice_type, params->current_language, params->current_voice_type);
 
                g_slist_foreach(g_config_client_list, invoke_voice_changed_cb, params);
                release_voice_changed_cb_params(params);
@@ -487,6 +500,9 @@ static void invoke_voice_changed_event(const char* before_language, int before_v
        params->current_language = strdup(current_language);
        params->current_voice_type = current_voice_type;
        params->auto_voice = auto_voice;
+
+       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Voice changed event. before_language(%s), before_voice_type(%d), current_language(%s), current_voice_type(%d), auto_voice(%d)", params->before_language, params->before_voice_type, params->current_language, params->current_voice_type, params->auto_voice);
+
        g_voice_changed_event_idler = ecore_idler_add(invoke_voice_changed_event_by_idler, params);
 }
 
@@ -718,7 +734,7 @@ static Eina_Bool tts_config_mgr_inotify_event_cb(void* data, Ecore_Fd_Handler *f
                                free(setting);
                        }
 
-                       SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Engine change(%s)", config_info.engine_id);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Engine change(%s)", config_info.engine_id);
 
                        /* Call all callbacks of client*/
                        invoke_engine_changed_event(config_info.engine_id, config_info.setting, config_info.language, config_info.type, config_info.auto_voice, config_info.credential);
@@ -727,13 +743,14 @@ static Eina_Bool tts_config_mgr_inotify_event_cb(void* data, Ecore_Fd_Handler *f
                if (auto_voice != config_info.auto_voice) {
                        config_info.auto_voice = auto_voice;
                }
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] config: auto_voice(%d)", (int)config_info.auto_voice);
 
                if (NULL != lang || TTS_CONFIG_VOICE_TYPE_NONE != voice_type) {
                        char* before_lang = strdup(config_info.language);
                        int before_type = config_info.type;
 
                        set_voice_into_config(&config_info, lang, voice_type);
-                       SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Voice change(%s, %d)", config_info.language, config_info.type);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Voice change(%s, %d)", config_info.language, config_info.type);
 
                        /* Call all callbacks of client*/
                        if (NULL != before_lang) {
@@ -745,7 +762,7 @@ static Eina_Bool tts_config_mgr_inotify_event_cb(void* data, Ecore_Fd_Handler *f
 
                if (-1 != speech_rate) {
                        config_info.speech_rate = speech_rate;
-                       SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Speech rate change(%d)", config_info.speech_rate);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Speech rate change(%d)", config_info.speech_rate);
 
                        /* Call all callbacks of client*/
                        invoke_speech_rate_changed_event(config_info.speech_rate);
@@ -753,7 +770,7 @@ static Eina_Bool tts_config_mgr_inotify_event_cb(void* data, Ecore_Fd_Handler *f
 
                if (-1 != pitch) {
                        config_info.pitch = pitch;
-                       SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "pitch change(%d)", config_info.pitch);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Pitch change(%d)", config_info.pitch);
 
                        /* Call all callbacks of client*/
                        invoke_pitch_changed_event(config_info.pitch);
@@ -761,7 +778,7 @@ static Eina_Bool tts_config_mgr_inotify_event_cb(void* data, Ecore_Fd_Handler *f
 
                if (0.0 <= bg_volume_ratio) {
                        config_info.bg_volume_ratio = bg_volume_ratio;
-                       SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "background volume ratio change(%lf)", config_info.bg_volume_ratio);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Background volume ratio change(%lf)", config_info.bg_volume_ratio);
 
                        /* Call all callbacks of client*/
                        invoke_bg_volume_ratio_changed_event(config_info.bg_volume_ratio);
@@ -844,6 +861,7 @@ static int set_voice_by_automation(int allowed_type_flag)
                SLOG(LOG_ERROR, TAG_TTSCONFIG, "[Config ERROR] Fail to get display language");
                return TTS_CONFIG_ERROR_OPERATION_FAILED;
        }
+       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Current display language(%s)", display_language);
 
        char selected_language[6] = {'\0', };
        strncpy(selected_language, display_language, sizeof(selected_language) - 1);
@@ -851,6 +869,7 @@ static int set_voice_by_automation(int allowed_type_flag)
        display_language = NULL;
        int selected_type = config_info.type;
 
+       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Seletected language(%s), selected type(%d)", selected_language, selected_type);
        if (false == __tts_config_mgr_check_lang_is_valid(config_info.engine_id, selected_language, selected_type)) {
                /* Display language is not valid */
                char* tmp_language = NULL;
@@ -869,9 +888,10 @@ static int set_voice_by_automation(int allowed_type_flag)
                strncpy(selected_language, tmp_language, sizeof(selected_language) - 1);
                free(tmp_language);
                tmp_language = NULL;
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Seletected language(%s), selected type(%d)", selected_language, selected_type);
        }
 
-       SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[Config] Select default voice : lang(%s) type(%d)", selected_language, selected_type);
+       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[Config INFO] Select default voice : lang(%s) type(%d)", selected_language, selected_type);
        if (__is_client_type(allowed_type_flag)) {
                if (0 != tts_parser_set_voice(selected_language, selected_type)) {
                        SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to save config");
@@ -879,6 +899,7 @@ static int set_voice_by_automation(int allowed_type_flag)
                }
 
                invoke_voice_changed_event(config_info.language, config_info.type, selected_language, selected_type, config_info.auto_voice);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] voice changed event was invoked. language(%s), type(%d), selected language(%s), selected type(%d), auto_voice(%d)", config_info.language, config_info.type, selected_language, selected_type, (int)config_info.auto_voice);
        } else {
                SLOG(LOG_INFO, TAG_TTSCONFIG, "Client is not allowed to save configuration. Skip saving configuration file.");
        }
@@ -919,6 +940,8 @@ void __tts_config_screen_reader_changed_cb(keynode_t *key, void *data)
                return;
        }
 
+       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Changed screen reader (%d)", screen_reader);
+
        GSList *iter = NULL;
        tts_config_client_s* temp_client = NULL;
 
@@ -1145,7 +1168,7 @@ static Eina_Bool __tts_config_mgr_engine_config_inotify_event_callback(void* dat
                        if (0 != ret) {
                                SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to set voice");
                        } else {
-                               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[DEBUG] Saved default voice : lang(%s), type(%d)", temp_lang, temp_type);
+                               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[DEBUG] Saved default voice : lang(%s), type(%d)", temp_lang, temp_type);
                        }
                        if (NULL != temp_lang) {
                                free(temp_lang);
@@ -1880,6 +1903,7 @@ int tts_config_mgr_set_voice(const char* language, int type)
        }
 
        /* Check language is valid */
+       SECURE_SLOG(LOG_ERROR, TAG_TTSCONFIG, "[Config INFO] Select default voice : lang(%s) type(%d)", language, type);
        if (__is_client_type(TTS_CONFIG_CLIENT_TYPE_SETTING | TTS_CONFIG_CLIENT_TYPE_SERVER | TTS_CONFIG_CLIENT_TYPE_INTERRUPT)) {
                if (0 != tts_parser_set_voice(language, type)) {
                        SLOG(LOG_ERROR, TAG_TTSCONFIG, "Fail to save default voice");
@@ -2208,6 +2232,8 @@ bool tts_config_check_default_voice_is_valid(const char* language, int type)
                return false;
        }
 
+       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Check default voice is valid. engine_id(%s), language(%s), type(%d)", config_info.engine_id, language, type);
+
        return __tts_config_mgr_check_lang_is_valid(config_info.engine_id, language, type);
 }
 
@@ -2262,7 +2288,7 @@ int __tts_config_mgr_print_engine_info()
 
        if (0 >= g_slist_length(g_engine_list)) {
                SLOG(LOG_DEBUG, TAG_TTSCONFIG, "-------------- engine list -----------------");
-               SLOG(LOG_DEBUG, TAG_TTSCONFIG, "  No Engine in engine directory");
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "  No Engine in engine directory");
                SLOG(LOG_DEBUG, TAG_TTSCONFIG, "--------------------------------------------");
                return TTS_CONFIG_ERROR_NONE;
        }
@@ -2343,7 +2369,7 @@ int tts_config_mgr_get_max_text_size(unsigned int* size)
        }
 
        *size = engine_info->text_size;
-       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[DEBUG] Max text size is %d.", *size);
+       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[DEBUG] Max text size is %d.", *size);
 
        return TTS_CONFIG_ERROR_NONE;
 }
index edadb2d..eaadfe5 100644 (file)
@@ -1040,7 +1040,7 @@ int tts_parser_unload_config(void)
 
 int tts_parser_set_config_info(tts_config_s* config_info)
 {
-       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[DEBUG] Set config info");
+       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[DEBUG] Set config info");
        if (NULL == config_info) {
                SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] config_info is NULL");
                return -1;
@@ -1134,6 +1134,8 @@ static int __set_value_into_configuration(const char* key, const char* value)
                SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Parameter is NULL");
        }
 
+       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Set value into config. key(%s), value(%s)", key, value);
+
        xmlNodePtr cur = NULL;
        cur = xmlDocGetRootElement(g_config_doc);
        if (cur == NULL) {
@@ -1156,7 +1158,7 @@ static int __set_value_into_configuration(const char* key, const char* value)
                if (0 == xmlStrcmp(cur->name, (const xmlChar *)key)) {
                        xmlNodeSetContent(cur, (const xmlChar *)value);
 
-                       SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Set key(%s) : value(%s)", key, value);
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Set key(%s) : value(%s)", key, value);
                        break;
                }
 
@@ -1170,7 +1172,7 @@ static void __save_configuration(xmlDocPtr config_doc)
 {
        int ret = xmlSaveFile(TTS_CONFIG, config_doc);
        if (0 > ret) {
-               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Save result : file(%s), ret(%d)", TTS_CONFIG, ret);
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Save result : file(%s), ret(%d) errno(%d)", TTS_CONFIG, ret, errno);
        } else {
                static FILE* pFile;
                pFile = fopen(TTS_CONFIG, "r");
@@ -1236,6 +1238,8 @@ int tts_parser_set_voice(const char* language, int type)
                return -1;
        }
 
+       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Set voice. language(%s), type(%d)", language, type);
+
        if (0 != __set_value_into_configuration(TTS_TAG_CONFIG_LANGUAGE, language)) {
                return -1;
        }
@@ -1252,6 +1256,9 @@ int tts_parser_set_voice(const char* language, int type)
 int tts_parser_set_auto_voice(bool value)
 {
        char* temp = value ? "on" : "off";
+
+       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Set auto voice (%d)", (int)value);
+
        if (0 != __set_value_into_configuration(TTS_TAG_CONFIG_AUTO_VOICE, temp)) {
                return -1;
        }
@@ -1267,6 +1274,8 @@ int tts_parser_set_speech_rate(int value)
        memset(temp, '\0', 10);
        snprintf(temp, 10, "%d", value);
 
+       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Set speech rate (%d)", value);
+
        if (0 != __set_value_into_configuration(TTS_TAG_CONFIG_SPEECH_RATE, temp)) {
                return -1;
        }
@@ -1282,6 +1291,8 @@ int tts_parser_set_pitch(int value)
        memset(temp, '\0', 10);
        snprintf(temp, 10, "%d", value);
 
+       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Set pitch (%d)", value);
+
        if (0 != __set_value_into_configuration(TTS_TAG_CONFIG_PITCH, temp)) {
                return -1;
        }
@@ -1297,6 +1308,8 @@ int tts_parser_set_bg_volume_ratio(double value)
        memset(temp, '\0', 10);
        snprintf(temp, 10, "%d", (int)(value * VOLUME_BASE_VALUE));
 
+       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[INFO] Set background volume ratio (%lf)", value);
+
        if (0 != __set_value_into_configuration(TTS_TAG_CONFIG_BACKGROUND_VOLUME_RATIO, temp)) {
                return -1;
        }
index 6f8e55d..74861bb 100644 (file)
@@ -404,7 +404,7 @@ static int __update_voice_list()
 
 int ttsd_engine_agent_load_current_engine()
 {
-       SLOG(LOG_DEBUG, tts_tag(), "[Engine Agent DEBUG] load current engine START");
+       SLOG(LOG_INFO, tts_tag(), "[Engine Agent] load current engine START");
 
        if (false == __is_agent_initialized()) {
                SLOG(LOG_ERROR, tts_tag(), "[Engine Agent ERROR] Not Initialized");
@@ -434,10 +434,12 @@ int ttsd_engine_agent_load_current_engine()
        /* Select default voice */
        if (NULL != g_engine_info->default_lang) {
                bool is_valid = false;
+               SLOG(LOG_ERROR, tts_tag(), "[Engine Agent INFO] Current g_engine_info. default_lang(%s), default_vctype(%d)", g_engine_info->default_lang, g_engine_info->default_vctype);
+
                ret = g_engine_info->callbacks->is_valid_voice(g_engine_info->default_lang, g_engine_info->default_vctype, &is_valid);
                if (0 == ret) {
                        if (true == is_valid) {
-                               SLOG(LOG_DEBUG, tts_tag(), "[Engine Agent SUCCESS] Set origin default voice to current engine : lang(%s), type(%d)",
+                               SLOG(LOG_INFO, tts_tag(), "[Engine Agent SUCCESS] Set origin default voice to current engine : lang(%s), type(%d)",
                                        g_engine_info->default_lang, g_engine_info->default_vctype);
                        } else {
                                SLOG(LOG_WARN, tts_tag(), "[Engine Agent WARNING] Fail to set origin default voice : lang(%s), type(%d)",
@@ -453,9 +455,10 @@ int ttsd_engine_agent_load_current_engine()
        }
 
        /* load default voice */
+       SLOG(LOG_ERROR, tts_tag(), "[Engine Agent INFO] Current g_engine_info. default_lang(%s), default_vctype(%d)", g_engine_info->default_lang, g_engine_info->default_vctype);
        ret = g_engine_info->callbacks->load_voice(g_engine_info->default_lang, g_engine_info->default_vctype);
        if (0 == ret) {
-               SLOG(LOG_DEBUG, tts_tag(), "[Engine Agent SUCCESS] Load default voice : lang(%s), type(%d)",
+               SLOG(LOG_INFO, tts_tag(), "[Engine Agent SUCCESS] Load default voice : lang(%s), type(%d)",
                        g_engine_info->default_lang, g_engine_info->default_vctype);
        } else {
                SLOG(LOG_WARN, tts_tag(), "[Engine Agent ERROR] Fail to load default voice : lang(%s), type(%d) result(%s)",
@@ -551,7 +554,7 @@ bool ttsd_engine_select_valid_voice(const char* lang, int type, const char* ptts
                return false;
        }
 
-       SECURE_SLOG(LOG_DEBUG, tts_tag(), "[Engine Agent] Select voice : input lang(%s), input type(%d), input ptts_id(%s), default lang(%s), default type(%d)",
+       SLOG(LOG_ERROR, tts_tag(), "[Engine Agent] Select voice : input lang(%s), input type(%d), input ptts_id(%s), default lang(%s), default type(%d)",
                (NULL == lang) ? "NULL" : lang, type, (NULL == ptts_id) ? "NULL" : ptts_id, (NULL == g_engine_info->default_lang) ? "NULL" : g_engine_info->default_lang, g_engine_info->default_vctype);
 
        /* case 1 : Both are default */
@@ -692,6 +695,8 @@ bool ttsd_engine_select_valid_voice(const char* lang, int type, const char* ptts
                }
        }
 
+       SLOG(LOG_ERROR, tts_tag(), "[Engine Agent] Selected voice : lang(%s), type(%d)", *out_lang, *out_type);
+
        if (true == result) {
                if (NULL != ptts_id)
                        SECURE_SLOG(LOG_DEBUG, tts_tag(), "[Engine Agent] Selected voice : lang(%s), type(%d), ptts_id(%s)", *out_lang, *out_type, *out_ptts_id);
@@ -716,7 +721,7 @@ static ttsvoice_s* __get_ttsvoice(const char* lang, const int vctype)
 
                if (NULL != data) {
                        if (NULL != data->lang && 0 == strcmp(data->lang, lang) && data->type == vctype) {
-                               SLOG(LOG_DEBUG, tts_tag(), "[Engine Agent] Find voice : default(%d) loaded(%d) ref(%d) lang(%s) type(%d)",
+                               SLOG(LOG_ERROR, tts_tag(), "[Engine Agent] Find voice : default(%d) loaded(%d) ref(%d) lang(%s) type(%d)",
                                        data->is_default, data->is_loaded,  data->client_ref_count, data->lang, data->type);
                                break;
                        }
@@ -743,11 +748,13 @@ int ttsd_engine_agent_set_default_voice(const char* language, int vctype)
                return ret;
        }
 
+       SLOG(LOG_ERROR, tts_tag(), "[Engine Agent] Set default voice : lang(%s), type(%d)", language, vctype);
+
        bool is_valid = false;
        ret = g_engine_info->callbacks->is_valid_voice(language, vctype, &is_valid);
        if (0 == ret) {
                if (true == is_valid) {
-                       SLOG(LOG_DEBUG, tts_tag(), "[Engine Agent SUCCESS] Current voice is valid : lang(%s), type(%d)",
+                       SLOG(LOG_ERROR, tts_tag(), "[Engine Agent SUCCESS] Current voice is valid : lang(%s), type(%d)",
                                (NULL == g_engine_info->default_lang) ? "NULL" : g_engine_info->default_lang, g_engine_info->default_vctype);
                } else {
                        SLOG(LOG_WARN, tts_tag(), "[Engine Agent WARNING] Current voice is invalid : lang(%s), type(%d)",
@@ -768,11 +775,11 @@ int ttsd_engine_agent_set_default_voice(const char* language, int vctype)
                        /* load voice */
                        ret = g_engine_info->callbacks->load_voice(data->lang, data->type);
                        if (0 == ret) {
-                               SECURE_SLOG(LOG_DEBUG, tts_tag(), "[Engine Agent SUCCESS] load voice : lang(%s), type(%d)",
+                               SLOG(LOG_ERROR, tts_tag(), "[Engine Agent SUCCESS] load voice : lang(%s), type(%d)",
                                        data->lang, data->type);
                                data->is_loaded = true;
                        } else {
-                               SECURE_SLOG(LOG_ERROR, tts_tag(), "[Engine Agent ERROR] Fail to load voice : lang(%s), type(%d), result(%s)",
+                               SLOG(LOG_ERROR, tts_tag(), "[Engine Agent ERROR] Fail to load voice : lang(%s), type(%d), result(%s)",
                                        data->lang, data->type, __ttsd_get_engine_error_code(ret));
                        }
                }
@@ -790,11 +797,11 @@ int ttsd_engine_agent_set_default_voice(const char* language, int vctype)
                        /* Unload voice */
                        ret = g_engine_info->callbacks->unload_voice(data->lang, data->type);
                        if (0 == ret) {
-                               SECURE_SLOG(LOG_DEBUG, tts_tag(), "[Engine Agent SUCCESS] Unload voice : lang(%s), type(%d)",
+                               SLOG(LOG_ERROR, tts_tag(), "[Engine Agent SUCCESS] Unload voice : lang(%s), type(%d)",
                                        data->lang, data->type);
                                data->is_loaded = false;
                        } else {
-                               SECURE_SLOG(LOG_ERROR, tts_tag(), "[Engine Agent ERROR] Fail to unload voice : lang(%s), type(%d), result(%s)",
+                               SLOG(LOG_ERROR, tts_tag(), "[Engine Agent ERROR] Fail to unload voice : lang(%s), type(%d), result(%s)",
                                        data->lang, data->type, __ttsd_get_engine_error_code(ret));
                        }
                }
@@ -812,7 +819,7 @@ int ttsd_engine_agent_set_default_voice(const char* language, int vctype)
        ttsd_print_voicelist();
 #endif
 
-       SECURE_SLOG(LOG_DEBUG, tts_tag(), "[Engine Agent SUCCESS] Set default voice : lang(%s), type(%d)",
+       SECURE_SLOG(LOG_ERROR, tts_tag(), "[Engine Agent SUCCESS] Set default voice : lang(%s), type(%d)",
                g_engine_info->default_lang, g_engine_info->default_vctype);
 
        return TTSD_ERROR_NONE;
@@ -1072,7 +1079,7 @@ int ttsd_engine_start_synthesis(const char* lang, int vctype, const char* ptts_i
                }
                return TTSD_ERROR_INVALID_VOICE;
        } else {
-               SECURE_SLOG(LOG_DEBUG, tts_tag(), "[Engine Agent] Start synthesis : language(%s), type(%d), ptts_id(%s), speed(%d), text(%s), credential(%s)",
+               SECURE_SLOG(LOG_ERROR, tts_tag(), "[Engine Agent DEBUG] Start synthesis : language(%s), type(%d), ptts_id(%s), speed(%d), text(%s), credential(%s)",
                        (NULL == temp_lang) ? "NULL" : temp_lang, temp_type, (NULL == temp_ptts_id) ? "NULL" : temp_ptts_id, speed, (NULL == text) ? "NULL" : text, (NULL == credential) ? "NULL" : credential);
        }
 
index bdd9298..5414d36 100644 (file)
@@ -500,6 +500,7 @@ static void __stop_all_client()
 
 static void __config_changed_cb(tts_config_type_e type, const char* str_param, int int_param, double double_param)
 {
+       SLOG(LOG_ERROR, tts_tag(), "[Server][DEBUG] Enter __config_changed_cb");
        switch (type) {
        case TTS_CONFIG_TYPE_ENGINE:
        {
@@ -508,10 +509,11 @@ static void __config_changed_cb(tts_config_type_e type, const char* str_param, i
                        SLOG(LOG_ERROR, tts_tag(), "[Server] engine id from config is NULL");
                        return;
                }
+               SLOG(LOG_ERROR, tts_tag(), "[Server][DEBUG] Enter __config_changed_cb : TTS_CONFIG_TYPE_ENGINE to (%s)", str_param);
 
                int ret = 0;
                if (true == ttsd_engine_agent_is_same_engine(str_param)) {
-                       SLOG(LOG_DEBUG, tts_tag(), "[Server Setting] new engine is the same as current engine");
+                       SLOG(LOG_INFO, tts_tag(), "[Server Setting] new engine is the same as current engine");
                        ret = ttsd_engine_agent_unload_current_engine();
                        if (0 != ret) {
                                SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to unload current engine : result(%d)", ret);
@@ -534,6 +536,7 @@ static void __config_changed_cb(tts_config_type_e type, const char* str_param, i
                        SLOG(LOG_ERROR, tts_tag(), "[Server] language from config is NULL");
                        return;
                }
+               SLOG(LOG_ERROR, tts_tag(), "[Server][DEBUG] Enter __config_changed_cb : TTS_CONFIG_TYPE_VOICE to (%s)", str_param);
 
                char* out_lang = NULL;
                int out_type;
@@ -547,7 +550,7 @@ static void __config_changed_cb(tts_config_type_e type, const char* str_param, i
                                SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to set valid language : lang(%s), type(%d)", out_lang, out_type);
                } else {
                        /* Current language is not available */
-                       SLOG(LOG_WARN, tts_tag(), "[Server WARNING] Fail to set voice : lang(%s), type(%d)", str_param, int_param);
+                       SLOG(LOG_ERROR, tts_tag(), "[Server WARNING] Fail to set voice : lang(%s), type(%d)", str_param, int_param);
                }
                if (NULL != out_lang) {
                        free(out_lang);
@@ -562,6 +565,7 @@ static void __config_changed_cb(tts_config_type_e type, const char* str_param, i
 
        case TTS_CONFIG_TYPE_SPEED:
        {
+               SLOG(LOG_DEBUG, tts_tag(), "[Server][DEBUG] Enter __config_changed_cb : change TTS_CONFIG_TYPE_SPEED");
                if (TTS_SPEED_MIN <= int_param && int_param <= TTS_SPEED_MAX) {
                        /* set default speed */
                        int ret = 0;
@@ -575,6 +579,7 @@ static void __config_changed_cb(tts_config_type_e type, const char* str_param, i
 
        case TTS_CONFIG_TYPE_PITCH:
        {
+               SLOG(LOG_DEBUG, tts_tag(), "[Server][DEBUG] Enter __config_changed_cb : change TTS_CONFIG_TYPE_PITCH");
                if (TTS_PITCH_MIN <= int_param && int_param <= TTS_PITCH_MAX) {
                        /* set default speed */
                        int ret = 0;
@@ -588,6 +593,7 @@ static void __config_changed_cb(tts_config_type_e type, const char* str_param, i
 
        case TTS_CONFIG_TYPE_BACKGROUND_VOLUME_RATIO:
        {
+               SLOG(LOG_DEBUG, tts_tag(), "[Server][DEBUG] Enter __config_changed_cb : change TTS_CONFIG_TYPE_BACKGROUND_VOLUME_RATIO");
                if (0.0 <= double_param && double_param <= 1.0) {
                        /* set default bg volume ratio */
                        int ret = 0;