Remove unused ISF logs
authorHaifeng Deng <haifeng.deng@samsung.com>
Tue, 22 Jan 2013 03:08:16 +0000 (11:08 +0800)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 22 Jan 2013 04:36:05 +0000 (13:36 +0900)
Change-Id: I09b2e1a9749f19a604508f9776c3193703edc058

ism/extras/efl_panel/isf_panel_efl.cpp
ism/extras/efl_panel/isf_panel_utility.cpp
ism/modules/config/scim_simple_config.cpp
ism/modules/frontend/scim_socket_frontend.cpp
ism/modules/imengine/scim_socket_imengine.cpp
ism/src/isf_query_utility.cpp
ism/src/scim_backend.cpp
ism/src/scim_global_config.cpp
ism/src/scim_helper_launcher.cpp

index 9631860..5321062 100644 (file)
@@ -534,10 +534,6 @@ static bool set_helper_ise (const String &uuid)
         _config->write (String (SCIM_CONFIG_DEFAULT_IMENGINE_FACTORY) + String ("/") + language, kbd_uuid);
     }
 
-    char buf[256] = {0};
-    snprintf (buf, sizeof (buf), "time:%ld  pid:%d  %s  %s  Start helper(%s)\n", time (0), getpid (), __FILE__, __func__, uuid.c_str ());
-    isf_save_log (buf);
-
    _panel_agent->start_helper (uuid);
     _config->write (String (SCIM_CONFIG_DEFAULT_HELPER_ISE), uuid);
 
@@ -2985,18 +2981,11 @@ static void start_default_ise (void)
 
     String default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), _initial_ise_uuid);
     String default_name = get_ise_name (default_uuid);
-    char buf[256] = {0};
-    snprintf (buf, sizeof (buf), "time:%ld  pid:%d  %s  %s  Launch default ISE(%s)\n", time (0), getpid (), __FILE__, __func__, default_name.c_str ());
-    isf_save_log (buf);
     if (!set_active_ise (default_uuid)) {
         std::cerr << __FUNCTION__ << " Failed to launch default ISE(" << default_uuid << ")\n";
-        snprintf (buf, sizeof (buf), "time:%ld  pid:%d  %s  %s  Failed to launch default ISE(%s)\n", time (0), getpid (), __FILE__, __func__, default_name.c_str ());
-        isf_save_log (buf);
 
         if (default_uuid != _initial_ise_uuid) {
             std::cerr << __FUNCTION__ << " Launch initial ISE(" << _initial_ise_uuid << ")\n";
-            snprintf (buf, sizeof (buf), "time:%ld  pid:%d  %s  %s  Launch initial ISE(%s)\n", time (0), getpid (), __FILE__, __func__, get_ise_name (_initial_ise_uuid).c_str ());
-            isf_save_log (buf);
             set_active_ise (_initial_ise_uuid);
         }
     }
@@ -3051,9 +3040,6 @@ static void check_hardware_keyboard (void)
         } else {
             uuid = helper_uuid.length () > 0 ? helper_uuid : _initial_ise_uuid;
         }
-        char buf[256] = {0};
-        snprintf (buf, sizeof (buf), "time:%ld  pid:%d  %s  %s  Launch ISE(%s)\n", time (0), getpid (), __FILE__, __func__, uuid.c_str ());
-        isf_save_log (buf);
 
         set_active_ise (uuid);
     }
@@ -3380,9 +3366,6 @@ int main (int argc, char *argv [])
 
         /* Load initial ISE information */
         _initial_ise_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID), String (SCIM_COMPOSE_KEY_FACTORY_UUID));
-        char buf[256] = {0};
-        snprintf (buf, sizeof (buf), "time:%ld  pid:%d  %s  %s  Initial ISE name(%s)\n", time (0), getpid (), __FILE__, __func__, get_ise_name (_initial_ise_uuid).c_str ());
-        isf_save_log (buf);
 
         /* Start default ISE */
         start_default_ise ();
index ca42248..fc0ac48 100644 (file)
@@ -280,9 +280,6 @@ void isf_get_factory_list (LOAD_ISE_TYPE  type,
     FILE *engine_list_file = fopen (user_file_name.c_str (), "r");
     if (engine_list_file == NULL) {
         std::cerr << __func__ << " Failed to open(" << user_file_name << ")\n";
-        char buf[256] = {0};
-        snprintf (buf, sizeof (buf), "time:%ld  pid:%d  %s  %s  Failed to open(%s)\n", time (0), getpid (), __FILE__, __func__, user_file_name.c_str ());
-        isf_save_log (buf);
         return;
     }
 
@@ -358,9 +355,6 @@ static bool add_keyboard_ise_module (const String module_name, const ConfigPoint
     FILE *engine_list_file = fopen (filename.c_str (), "a");
     if (engine_list_file == NULL) {
         std::cerr << __func__ << " Failed to open(" << filename << ")\n";
-        char buf[256] = {0};
-        snprintf (buf, sizeof (buf), "time:%ld  pid:%d  %s  %s  Failed to open(%s)\n", time (0), getpid (), __FILE__, __func__, filename.c_str ());
-        isf_save_log (buf);
         return false;
     }
 
@@ -430,9 +424,6 @@ static bool add_helper_ise_module (const String module_name)
     FILE *engine_list_file = fopen (filename.c_str (), "a");
     if (engine_list_file == NULL) {
         std::cerr << __func__ << " Failed to open(" << filename << ")\n";
-        char buf[256] = {0};
-        snprintf (buf, sizeof (buf), "time:%ld  pid:%d  %s  %s  Failed to open(%s)\n", time (0), getpid (), __FILE__, __func__, filename.c_str ());
-        isf_save_log (buf);
         return false;
     }
 
index 4ee579d..89a994c 100644 (file)
@@ -600,9 +600,6 @@ SimpleConfig::load_all_config ()
         }
     } else {
         std::cerr << __func__ << " Cannot open(" << sysconf << ")\n";
-        char buf[256] = {0};
-        snprintf (buf, sizeof (buf), "time:%ld  pid:%d  %s  %s  Cannot open(%s)\n", time (0), getpid (), __FILE__, __func__, sysconf.c_str ());
-        isf_save_log (buf);
     }
 
     if (!m_config.size () || (m_update_timestamp.tv_sec == 0 && m_update_timestamp.tv_usec == 0)) {
index 2219a98..6f7b1fd 100644 (file)
@@ -164,9 +164,6 @@ void SocketFrontEnd::load_helper_modules (const std::vector<String> &load_engine
         bool ret = isf_read_ise_info_list (USER_ENGINE_FILE_NAME, info_list);
         if (!ret) {
             std::cerr << __func__ << " Failed to read(" << USER_ENGINE_FILE_NAME << ")\n";
-            char buf[256] = {0};
-            snprintf (buf, sizeof (buf), "time:%ld  pid:%d  %s  %s  Failed to read(%s)\n", time (0), getpid (), __FILE__, __func__, USER_ENGINE_FILE_NAME);
-            isf_save_log (buf);
         }
         for (size_t i = 0; i < info_list.size (); ++i) {
             if (info_list [i].mode != TOOLBAR_HELPER_MODE)
@@ -186,9 +183,6 @@ void SocketFrontEnd::load_helper_modules (const std::vector<String> &load_engine
         std::ofstream engine_list_file (USER_ENGINE_FILE_NAME, std::ios::app);
         if (!engine_list_file) {
             std::cerr << __func__ << " Failed to open(" << USER_ENGINE_FILE_NAME << ")\n";
-            char buf[256] = {0};
-            snprintf (buf, sizeof (buf), "time:%ld  pid:%d  %s  %s  Failed to open(%s)\n", time (0), getpid (), __FILE__, __func__, USER_ENGINE_FILE_NAME);
-            isf_save_log (buf);
         }
 
         for (size_t i = 0; i < mod_list.size (); ++i) {
@@ -261,9 +255,6 @@ void SocketFrontEnd::run_helper (const Socket &client)
         m_send_trans.put_command (SCIM_TRANS_CMD_FAIL);
         return;
     }
-    char buf[256] = {0};
-    snprintf (buf, sizeof (buf), "time:%ld  pid:%d  %s  %s  uuid(%s)\n", time (0), getpid (), __FILE__, __func__, uuid.c_str ());
-    isf_save_log (buf);
 
     for (size_t i = 0; i < __helpers.size (); ++i) {
         if (__helpers [i].first.uuid == uuid && __helpers [i].second.length ()) {
@@ -289,9 +280,6 @@ void SocketFrontEnd::run_helper (const Socket &client)
                                    0};
 
                 SCIM_DEBUG_MAIN(2) << " Call scim-helper-launcher.\n";
-                char buf[256] = {0};
-                snprintf (buf, sizeof (buf), "time:%ld  pid:%d  %s  %s  Exec scim_helper_launcher(%s)\n", time (0), getpid (), __FILE__, __func__, __helpers [i].second.c_str ());
-                isf_save_log (buf);
 
                 execv (SCIM_HELPER_LAUNCHER_PROGRAM, (char **)argv);
                 exit (-1);
index 66bf4fc..7a90411 100644 (file)
@@ -278,9 +278,6 @@ SocketIMEngineGlobal::get_ise_info_map (const char *filename)
     FILE *engine_list_file = fopen (filename, "r");
     if (engine_list_file == NULL) {
         std::cerr << __func__ << " Failed to open(" << filename << ")\n";
-        char buf[256] = {0};
-        snprintf (buf, sizeof (buf), "time:%ld  pid:%d  %s  %s  Failed to open(%s)\n", time (0), getpid (), __FILE__, __func__, filename);
-        isf_save_log (buf);
         return;
     }
 
index 6064596..9616e18 100644 (file)
@@ -138,9 +138,6 @@ bool isf_write_ise_info_list (const char *filename, std::vector<ISEINFO> &info_l
     FILE *engine_list_file = fopen (filename, "w+");
     if (engine_list_file == NULL) {
         std::cerr << __func__ << " Failed to open(" << filename << ")\n";
-        char buf[256] = {0};
-        snprintf (buf, sizeof (buf), "time:%ld  pid:%d  %s  %s  Failed to open(%s)\n", time (0), getpid (), __FILE__, __func__, filename);
-        isf_save_log (buf);
         return false;
     }
 
@@ -155,9 +152,6 @@ bool isf_write_ise_info_list (const char *filename, std::vector<ISEINFO> &info_l
                                                    iter->icon, String (mode), String (option), iter->locales);
         if (fputs (line.c_str (), engine_list_file) < 0) {
             std::cerr << __func__ << " Failed to write(" << line << ")\n";
-            char buf[256] = {0};
-            snprintf (buf, sizeof (buf), "time:%ld  pid:%d  %s  %s  Failed to write(%s)\n", time (0), getpid (), __FILE__, __func__, line.c_str ());
-            isf_save_log (buf);
             break;
         }
     }
index fc73e5a..10dac78 100644 (file)
@@ -775,9 +775,6 @@ CommonBackEnd::add_module_info_from_cache_file (const ConfigPointer &config, std
         user_engine_file = fopen (user_file_name.c_str (), "a");
         if (user_engine_file == NULL) {
             std::cerr << __func__ << " Failed to open(" << user_file_name << ")\n";
-            char buf[256] = {0};
-            snprintf (buf, sizeof (buf), "time:%ld  pid:%d  %s  %s  Failed to open(%s)\n", time (0), getpid (), __FILE__, __func__, user_file_name.c_str ());
-            isf_save_log (buf);
         }
     }
 
@@ -841,9 +838,6 @@ CommonBackEnd::add_imengine_module_info (const String module_name, const ConfigP
     FILE *engine_list_file = fopen (filename.c_str (), "a");
     if (engine_list_file == NULL) {
         std::cerr << __func__ << " Failed to open(" << filename << ")\n";
-        char buf[256] = {0};
-        snprintf (buf, sizeof (buf), "time:%ld  pid:%d  %s  %s  Failed to open(%s)\n", time (0), getpid (), __FILE__, __func__, filename.c_str ());
-        isf_save_log (buf);
         return;
     }
 
index 887674f..197d9dd 100644 (file)
@@ -158,9 +158,6 @@ __initialize_config ()
         __config_repository.initialized = true;
     } else {
         std::cerr << __func__ << " Cannot open(" << sys_conf_file << ")\n";
-        char buf[256] = {0};
-        snprintf (buf, sizeof (buf), "time:%ld  pid:%d  %s  %s  Cannot open(%s)\n", time (0), getpid (), __FILE__, __func__, sys_conf_file.c_str ());
-        isf_save_log (buf);
     }
 
     if (usr_is) {
index e948b33..b8418cb 100644 (file)
@@ -158,10 +158,6 @@ int main (int argc, char *argv [])
 
     if (!helper_module.valid () || helper_module.number_of_helpers () == 0) {
         std::cerr << "Unable to load helper module(" << helper << ")\n";
-        char buf[256] = {0};
-        snprintf (buf, sizeof (buf), "time:%ld  pid:%d  %s  %s  Unable to load helper module(%s)\n", time (0), getpid (), __FILE__, __func__, helper.c_str ());
-        isf_save_log (buf);
-
         return -1;
     }