Add more log messages to the ERROR level group 17/265817/1 accepted/tizen/unified/20211101.140215 submit/tizen/20211029.093841
authorJi-hoon Lee <dalton.lee@samsung.com>
Fri, 29 Oct 2021 05:35:37 +0000 (14:35 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Fri, 29 Oct 2021 05:35:37 +0000 (14:35 +0900)
Change-Id: Ic0cffc1ce5f0a422a8947cd50944bbfc40e90526

plugins/wakeup-manager/src/wakeup_audio_manager.cpp
plugins/wakeup-manager/src/wakeup_engine_manager.cpp
plugins/wakeup-manager/src/wakeup_manager.cpp
src/service_ipc_dbus.cpp
src/service_main.cpp

index 7720a19..656a297 100644 (file)
@@ -235,7 +235,7 @@ void CAudioManager::streaming_audio_data_thread_func(long long start_time)
                iter = lead;
                advance(lead, 1);
        }
-       MWR_LOGI("data_count : %zu", mAudioData.size());
+       MWR_LOGE("data_count : %zu", mAudioData.size());
        lock.unlock();
 
        while (!(mStopStreamingThread.load())) {
@@ -316,7 +316,7 @@ void CAudioManager::streaming_audio_data_thread_func(long long start_time)
                        }
 
                        if (MAS_SPEECH_STREAMING_EVENT_FINISH == speech_data.event) {
-                               MWR_LOGI("[INFO] Finish to get and send speech data");
+                               MWR_LOGE("[INFO] Finish to get and send speech data");
                                finish_event_sent = true;
                                break;
                        }
@@ -333,7 +333,7 @@ void CAudioManager::streaming_audio_data_thread_func(long long start_time)
                lock.unlock();
                for (const auto& observer : observers) {
                        if (observer) {
-                               MWR_LOGI("No FINISH event sent yet, adding to finalize streaming session");
+                               MWR_LOGE("No FINISH event sent yet, adding to finalize streaming session");
                                if (!observer->on_streaming_audio_data(
                                        MAS_SPEECH_STREAMING_EVENT_FINISH, final_buffer, sizeof(final_buffer))) {
                                        LOGE("[Recorder WARNING] One of the observer returned false");
@@ -342,7 +342,7 @@ void CAudioManager::streaming_audio_data_thread_func(long long start_time)
                }
        }
        mStreamingThreadActive.store(false);
-       MWR_LOGI("[EXIT]");
+       MWR_LOGE("[EXIT]");
 }
 
 void CAudioManager::add_audio_data(mas_speech_data& data, long long time)
@@ -360,7 +360,7 @@ void CAudioManager::add_audio_data(mas_speech_data& data, long long time)
        static auto last = std::chrono::steady_clock::now();
        auto now = std::chrono::steady_clock::now();
        if (now - last > interval) {
-               MWR_LOGI("Feeding audio data : num(%d), now(%" PRId64 "), %d %zu",
+               MWR_LOGE("Feeding audio data : num(%d), now(%" PRId64 "), %d %zu",
                        num, now.time_since_epoch().count(),
                        mStreamingThreadActive.load(), mAudioData.size());
                last = now;
index 9a5b154..2d439d0 100644 (file)
@@ -215,7 +215,7 @@ bool CWakeupEngineManager::set_assistant_language(string appid, string language)
 
 void CWakeupEngineManager::set_assistant_activated(string appid, bool activated)
 {
-       MWR_LOGI("[ENTER] : %s %d", appid.c_str(), activated);
+       MWR_LOGE("[ENTER] : %s %d", appid.c_str(), activated);
        for (auto& info : mEngineInfo) {
                const auto& iter = find_if(info.assistant_list.begin(), info.assistant_list.end(),
                        [appid](const string& assistant) {
@@ -275,7 +275,7 @@ void CWakeupEngineManager::set_wake_word_audio_require_flag(bool require)
 
 void CWakeupEngineManager::streaming_speech_data_thread_func()
 {
-       MWR_LOGI("[ENTER]");
+       MWR_LOGE("[ENTER]");
 
        if (nullptr == mSelectedEngine) {
                MWR_LOGE("No Engine Selected");
@@ -456,7 +456,7 @@ void CWakeupEngineManager::streaming_speech_data_thread_func()
                        }
 
                        if (MAS_SPEECH_STREAMING_EVENT_FINISH == speech_data.event) {
-                               MWR_LOGI("[INFO] Finish to get and send speech data");
+                               MWR_LOGE("[INFO] Finish to get and send speech data");
                                finish_event_sent = true;
                                break;
                        }
@@ -469,7 +469,7 @@ void CWakeupEngineManager::streaming_speech_data_thread_func()
                unsigned char final_buffer[2] = {'\0', };
                for (const auto& observer : mObservers) {
                        if (observer) {
-                               MWR_LOGI("No FINISH event sent yet, adding to finalize streaming session");
+                               MWR_LOGE("No FINISH event sent yet, adding to finalize streaming session");
                                if (!observer->on_streaming_audio_data(
                                        MAS_SPEECH_STREAMING_EVENT_FINISH, final_buffer, sizeof(final_buffer))) {
                                        LOGE("[Recorder WARNING] One of the observer returned false");
@@ -486,7 +486,7 @@ void CWakeupEngineManager::streaming_speech_data_thread_func()
 #endif
        }
 
-       MWR_LOGI("[EXIT]");
+       MWR_LOGE("[EXIT]");
 }
 
 void CWakeupEngineManager::start_streaming_current_utterance_data()
index 6ed89fd..c38667a 100644 (file)
@@ -103,7 +103,7 @@ void CWakeupManager::initialize_wakeup_policy()
 
 bool CWakeupManager::initialize()
 {
-       MWR_LOGI("[ENTER]");
+       MWR_LOGE("[ENTER]");
 
        mPolicyEventObserver.set_wakeup_manager(this);
        mEngineEventObserver.set_wakeup_manager(this);
@@ -138,7 +138,7 @@ bool CWakeupManager::initialize()
 
 bool CWakeupManager::deinitialize()
 {
-       MWR_LOGI("[ENTER]");
+       MWR_LOGE("[ENTER]");
 
        stop_streaming_duration_timer();
 
@@ -155,7 +155,7 @@ bool CWakeupManager::deinitialize()
        mWakeupSettings.deinitialize();
        mAssistantLanguageInfo.clear();
 
-       MWR_LOGI("[END]");
+       MWR_LOGE("[END]");
        return true;
 }
 
@@ -310,7 +310,7 @@ bool CWakeupManager::set_assistant_enabled(string appid, bool enabled)
 
 bool CWakeupManager::set_default_assistant(string appid)
 {
-       MWR_LOGI("[ENTER]");
+       MWR_LOGE("[ENTER] %s", appid.c_str());
 
        /* Check if previous default assistant has to be deactivated */
        bool activated = true;
@@ -514,7 +514,7 @@ bool CWakeupManager::change_voice_key_status(ma_voice_key_status_e status) {
 
 bool CWakeupManager::process_plugin_event(mas_plugin_event_e event, void* data, int len)
 {
-       MWR_LOGI("[ENTER] : %d", event);
+       MWR_LOGE("[ENTER] : %d", event);
        if (WAKEUP_MANAGER_STATE_INACTIVE == mWakeupManagerState)
                return false;
 
index 9e7acd0..f57d9cf 100644 (file)
@@ -273,9 +273,9 @@ int CServiceIpcDbus::send_streaming_audio_data(pid_t pid, int event, void* data,
        long long current_time = get_current_milliseconds_after_epoch();
 
        static int last_serial_waiting_for_flush = -1;
-       if (0 == header.streaming_data_serial % 50) {
+       if (0 == header.streaming_data_serial % 50 || MAS_SPEECH_STREAMING_EVENT_CONTINUE != event) {
                last_serial_waiting_for_flush = header.streaming_data_serial;
-               MAS_LOGI("queueing streaming data, serial : %d", last_serial_waiting_for_flush);
+               MAS_LOGE("queueing streaming data, serial : %d", last_serial_waiting_for_flush);
        }
        if (pending_buffer_size + total_size > STREAMING_BUFFER_SIZE ||
                MAS_SPEECH_STREAMING_EVENT_FINISH == event ||
@@ -304,7 +304,7 @@ int CServiceIpcDbus::send_streaming_audio_data(pid_t pid, int event, void* data,
                }
 
                if (-1 != last_serial_waiting_for_flush) {
-                       MAS_LOGI("flushing streaming data, serial : %d", last_serial_waiting_for_flush);
+                       MAS_LOGE("flushing streaming data, serial : %d", last_serial_waiting_for_flush);
                        last_serial_waiting_for_flush =  -1;
                }
        }
index 8a401c1..866cf20 100644 (file)
@@ -225,7 +225,7 @@ int CServiceMain::client_send_result(pid_t pid, const char* display_text,
 
 int CServiceMain::client_send_recognition_result(pid_t pid, int result)
 {
-       MAS_LOGI("[Enter] pid(%d), result(%d)", pid, result);
+       MAS_LOGE("[Enter] pid(%d), result(%d)", pid, result);
        if (!is_current_assistant(pid)) return -1;
 
        bool ui_panel_enabled = mServicePlugin.is_ui_panel_enabled();
@@ -249,7 +249,7 @@ int CServiceMain::client_send_recognition_result(pid_t pid, int result)
 
 int CServiceMain::client_start_streaming_audio_data(pid_t pid, int type)
 {
-       MAS_LOGI("[ENTER] %d", type);
+       MAS_LOGE("[ENTER] %d", type);
 
        int ret = -1;
        if (!is_current_assistant(pid)) {
@@ -276,7 +276,7 @@ int CServiceMain::client_start_streaming_audio_data(pid_t pid, int type)
 
 int CServiceMain::client_stop_streaming_audio_data(pid_t pid, int type)
 {
-       MAS_LOGI("[ENTER] %d", type);
+       MAS_LOGE("[ENTER] %d", type);
 
        int ret = -1;
        if (!is_current_assistant(pid)) {
@@ -679,7 +679,7 @@ static void active_state_changed_cb(std::string key, void* user_data)
        boost::optional<bool> activated =
                manager->get_bool(MULTI_ASSISTANT_SETTINGS_ACTIVATED);
        if (activated) {
-               MAS_LOGI("multi-assistant active state : %d\n", *activated);
+               MAS_LOGE("multi-assistant active state : %d\n", *activated);
 
                CServicePlugin *plugin = nullptr;
                if (g_service_main) {
@@ -955,7 +955,7 @@ int CServiceMain::set_current_client_by_wakeup_word(const char *wakeup_word)
                                if (0 < strlen(items[loop].wakeup_word[inner_loop])) {
                                        if (0 == strncmp(wakeup_word, items[loop].wakeup_word[inner_loop], MAX_WAKEUP_WORD_LEN)) {
                                                mCurrentClientInfo = loop;
-                                               MAS_LOGI("mCurrentClientInfo : %d %s", mCurrentClientInfo, wakeup_word);
+                                               MAS_LOGE("mCurrentClientInfo : %d %s", mCurrentClientInfo, wakeup_word);
                                                ret = 0;
                                        }
                                }
@@ -978,7 +978,7 @@ int CServiceMain::set_current_client_by_wakeup_word(const char *wakeup_word)
                                                }
                                                if (0 == strncmp(wakeup_word, comparand, MAX_WAKEUP_WORD_LEN)) {
                                                        mCurrentClientInfo = loop;
-                                                       MAS_LOGI("mCurrentClientInfo : %d %s", mCurrentClientInfo, wakeup_word);
+                                                       MAS_LOGE("mCurrentClientInfo : %d %s", mCurrentClientInfo, wakeup_word);
                                                        ret = 0;
                                                }
                                        }
@@ -1013,7 +1013,7 @@ int CServiceMain::set_current_client_by_appid(const char *appid)
                        0 < strlen(items[loop].appid) &&
                        0 < strlen(items[loop].wakeup_word[0])) {
                        if (strncmp(appid, items[loop].appid, MAX_APPID_LEN) == 0) {
-                               MAS_LOGI("mCurrentClientInfo : %d %s", mCurrentClientInfo, appid);
+                               MAS_LOGE("mCurrentClientInfo : %d %s", mCurrentClientInfo, appid);
                                mCurrentClientInfo = loop;
                                ret = 0;
                        }
@@ -1313,7 +1313,7 @@ bool CServiceMain::is_valid_wakeup_engine(const char* appid)
 bool CServiceMain::app_create(void *data)
 {
        // Todo: add your code here.
-       MAS_LOGI("[ENTER] Service app create");
+       MAS_LOGE("[ENTER] Service app create");
 
        g_service_main = this;
 
@@ -1361,13 +1361,13 @@ bool CServiceMain::app_create(void *data)
 
        mPackageUpdateMonitor.initialize();
 
-       MAS_LOGI("[END] Service app create");
+       MAS_LOGE("[END] Service app create");
        return true;
 }
 
 void CServiceMain::app_terminate(void *data)
 {
-       MAS_LOGI("[ENTER]");
+       MAS_LOGE("[ENTER]");
 
        mPackageUpdateMonitor.deinitialize();
 
@@ -1383,7 +1383,7 @@ void CServiceMain::app_terminate(void *data)
 
        g_service_main = nullptr;
 
-       MAS_LOGI("[END]");
+       MAS_LOGE("[END]");
        return;
 }