[glom] Use G_STRFUNC with std::cerr and std::cout.



commit 58a14951ec0b130a2ac44e8866833df7a6be818d
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Jun 21 19:15:27 2010 +0200

    Use G_STRFUNC with std::cerr and std::cout.
    
    * *.h/cc: Replace hard-coded copy/pastes of method names with
    G_STRFUNC, with the help of regexxer.

 ChangeLog                                          |    7 +
 glom/application.cc                                |   22 ++--
 glom/bakery/app_withdoc_gtk.cc                     |    2 +-
 glom/base_db.cc                                    |   60 +++++-----
 glom/base_db_table_data.cc                         |   24 ++--
 glom/dialog_connection.cc                          |    2 +-
 glom/dialog_existing_or_new.cc                     |    2 +-
 glom/frame_glom.cc                                 |   30 +++---
 glom/glade_utils.cc                                |    2 +-
 glom/import_csv/csv_parser.cc                      |    6 +-
 glom/import_csv/dialog_import_csv_progress.cc      |    4 +-
 glom/libglom/connectionpool.cc                     |   26 ++--
 glom/libglom/connectionpool_backends/postgres.cc   |   10 +-
 .../connectionpool_backends/postgres_self.cc       |   24 ++--
 glom/libglom/connectionpool_backends/sqlite.cc     |    8 +-
 glom/libglom/data_structure/field.cc               |    8 +-
 glom/libglom/data_structure/fieldtypes.cc          |    6 +-
 glom/libglom/data_structure/glomconversions.cc     |   34 +++---
 .../data_structure/layout/layoutitem_field.cc      |    4 +-
 .../data_structure/layout/usesrelationship.cc      |    2 +-
 glom/libglom/data_structure/translatable_item.cc   |    2 +-
 glom/libglom/db_utils.cc                           |  118 ++++++++++----------
 glom/libglom/document/bakery/document.cc           |   10 +-
 glom/libglom/document/bakery/document_xml.cc       |    2 +-
 glom/libglom/document/document.cc                  |   32 +++---
 glom/libglom/example_document_load.cc              |    2 +-
 glom/libglom/privs.cc                              |   10 +-
 glom/libglom/python_embed/py_glom_record.cc        |   16 ++--
 glom/libglom/python_embed/py_glom_relatedrecord.cc |    2 +-
 .../libglom/python_embed/pygdavalue_conversions.cc |    2 +-
 glom/libglom/sharedptr.h                           |    8 +-
 glom/libglom/spawn_with_feedback.cc                |    6 +-
 glom/libglom/utils.cc                              |   28 +++---
 glom/main.cc                                       |    2 +-
 glom/mode_data/box_data_calendar_related.cc        |    6 +-
 glom/mode_data/box_data_details.cc                 |   10 +-
 glom/mode_data/box_data_list.cc                    |   20 ++--
 glom/mode_data/box_data_list_related.cc            |   10 +-
 glom/mode_data/box_data_portal.cc                  |   24 ++--
 .../mode_data/datawidget/combo_as_radio_buttons.cc |    2 +-
 glom/mode_data/datawidget/datawidget.cc            |    2 +-
 glom/mode_data/flowtablewithfields.cc              |   10 +-
 glom/mode_data/notebook_data.cc                    |    2 +-
 glom/mode_design/dialog_database_preferences.cc    |    4 +-
 glom/mode_design/fields/box_db_table_definition.cc |    6 +-
 glom/mode_design/fields/dialog_fielddefinition.cc  |    2 +-
 glom/mode_design/iso_codes.cc                      |    2 +-
 glom/mode_design/layout/combobox_fields.cc         |    2 +-
 glom/mode_design/layout/combobox_relationship.cc   |    4 +-
 .../layout/dialog_layout_calendar_related.cc       |    8 +-
 glom/mode_design/layout/dialog_layout_details.cc   |    6 +-
 .../print_layouts/window_print_layout_edit.cc      |    2 +-
 .../report_layout/dialog_layout_report.cc          |    2 +-
 glom/mode_design/translation/combobox_locale.cc    |    2 +-
 glom/mode_design/users/dialog_groups_list.cc       |    6 +-
 glom/mode_design/users/dialog_users_list.cc        |    6 +-
 glom/navigation/box_tables.cc                      |   12 +-
 glom/navigation/maemo/pickerbutton_table.cc        |    2 +-
 glom/print_layout/canvas_layout_item.cc            |   12 +-
 glom/print_layout/canvas_print_layout.cc           |   12 +-
 glom/python_embed/glom_python.cc                   |   16 ++--
 glom/utility_widgets/adddel/adddel.cc              |    2 +-
 .../canvas/canvas_group_resizable.cc               |    8 +-
 .../utility_widgets/canvas/canvas_image_movable.cc |    2 +-
 glom/utility_widgets/canvas/canvas_item_movable.cc |    2 +-
 glom/utility_widgets/canvas/canvas_line_movable.cc |    4 +-
 .../utility_widgets/canvas/canvas_table_movable.cc |    2 +-
 glom/utility_widgets/db_adddel/db_adddel.cc        |   16 ++--
 .../utility_widgets/db_adddel/glom_db_treemodel.cc |   36 +++---
 glom/utility_widgets/flowtable_dnd.cc              |    8 +-
 glom/utility_widgets/imageglom.cc                  |    2 +-
 glom/utility_widgets/layoutwidgetutils.cc          |    2 +-
 glom/xsl_utils.cc                                  |    2 +-
 tests/import/test_parsing.cc                       |    2 +-
 tests/test_document_autosave.cc                    |    4 +-
 tests/test_document_load.cc                        |    2 +-
 tests/test_python_execute_script.cc                |    4 +-
 tests/test_selfhosting_new_from_example.cc         |    2 +-
 78 files changed, 411 insertions(+), 404 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 35c06c3..baddf9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2010-06-21  Murray Cumming  <murrayc murrayc com>
 
+	Use G_STRFUNC with std::cerr and std::cout.
+
+	* *.h/cc: Replace hard-coded copy/pastes of method names with 
+	G_STRFUNC, with the help of regexxer.
+
+2010-06-21  Murray Cumming  <murrayc murrayc com>
+
 	Adapt use of Gda::ServerOperation.
 
 	* glom/libglom/connectionpool_backends/backend.cc: add_column(), 
diff --git a/glom/application.cc b/glom/application.cc
index a48929f..da14a8f 100644
--- a/glom/application.cc
+++ b/glom/application.cc
@@ -742,7 +742,7 @@ void Application::open_browsed_document(const EpcServiceInfo* server, const Glib
       document_contents = (gchar*)epc_consumer_lookup(consumer, "document", &length, &error);
       if(error)
       {
-        std::cout << "Error when calling epc_consumer_lookup(): " << std::endl << "  " << error->message << std::endl;
+        std::cout << "debug: " << G_STRFUNC << ": " << std::endl << "  " << error->message << std::endl;
         const int error_code = error->code;
         g_clear_error(&error);
 
@@ -902,7 +902,7 @@ void Application::new_instance(const Glib::ustring& uri) //Override
     &gerror);
   if(gerror)
   {
-    std::cerr << "Application::new_instance(): error calling gdk_spawn_command_line_on_screen(): " << gerror->message << std::endl;
+    std::cerr << G_STRFUNC << ": " << gerror->message << std::endl;
   }
 }
 
@@ -969,7 +969,7 @@ bool Application::check_document_hosting_mode_is_supported(Document* document)
     default:
     {
       //on_document_load() should have checked for this already, informing the user.
-      std::cerr << "Glom: setup_connection_pool_from_document(): Unhandled hosting mode: " << document->get_hosting_mode() << std::endl;
+      std::cerr << G_STRFUNC << ": Unhandled hosting mode: " << document->get_hosting_mode() << std::endl;
      g_assert_not_reached();
      break;
     }
@@ -1163,11 +1163,11 @@ bool Application::on_document_load()
           }
           else
           #endif // !GLOM_ENABLE_CLIENT_ONLY
-            std::cerr << "Application::on_document_load(): unexpected database_not_found error when opening example." << std::endl;
+            std::cerr << G_STRFUNC << ": unexpected database_not_found error when opening example." << std::endl;
         }
         else if(!test)
         {
-          std::cerr << "Application::on_document_load(): unexpected error." << std::endl;
+          std::cerr << G_STRFUNC << ": unexpected error." << std::endl;
         }
       }
 
@@ -1412,7 +1412,7 @@ bool Application::offer_new_or_existing()
 #endif
       case Dialog_ExistingOrNew::NONE:
       default:
-	std::cerr << "Application::offer_new_or_existing(): Unhandled action: " << dialog->get_action() << std::endl;
+	std::cerr << G_STRFUNC << ": Unhandled action: " << dialog->get_action() << std::endl;
         g_assert_not_reached();
         break;
       }
@@ -1421,7 +1421,7 @@ bool Application::offer_new_or_existing()
       Document* document = dynamic_cast<Document*>(get_document());
       if(!document)
       {
-        std::cerr << "Application::offer_new_or_existing(): document was NULL." << std::endl;
+        std::cerr << G_STRFUNC << ": document was NULL." << std::endl;
         return false;
       }
 
@@ -1738,7 +1738,7 @@ void Application::fill_menu_tables()
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << " Application::fill_menu_tables(): building menus failed: " <<  ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": building menus failed: " <<  ex.what() << std::endl;
     std::cerr << "   The ui_description was: " <<  ui_description << std::endl;
   }
 }
@@ -1823,7 +1823,7 @@ void Application::fill_menu_reports(const Glib::ustring& table_name)
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << " Application::fill_menu_reports(): building menus failed: " <<  ex.what();
+    std::cerr << G_STRFUNC << ": building menus failed: " <<  ex.what();
   }
 }
 #endif //GLOM_ENABLE_MAEMO
@@ -1921,7 +1921,7 @@ void Application::fill_menu_print_layouts(const Glib::ustring& table_name)
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << " Application::fill_menu_reports(): building menus failed: " <<  ex.what();
+    std::cerr << G_STRFUNC << ": building menus failed: " <<  ex.what();
   }
 }
 #endif //GLOM_ENABLE_MAEMO
@@ -2206,7 +2206,7 @@ Glib::ustring Application::ui_file_select_save(const Glib::ustring& old_file_uri
         }
         catch(const Gio::Error& ex)
         {
-          std::cerr << "Error during Gio::File::make_directory(): " << ex.what() << std::endl;
+          std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
         }
 
         //Add the filename (Note that the caller will add the extension if necessary, so we don't do it here.)
diff --git a/glom/bakery/app_withdoc_gtk.cc b/glom/bakery/app_withdoc_gtk.cc
index e7c63e1..84353f2 100644
--- a/glom/bakery/app_withdoc_gtk.cc
+++ b/glom/bakery/app_withdoc_gtk.cc
@@ -247,7 +247,7 @@ void App_WithDoc_Gtk::init_menus_file_recentfiles(const Glib::ustring& path)
   }
   else
   {
-    //std::cout << "debug: GlomBakery::App_WithDoc_Gtk::init_menus_file_recentfiles(): No recent files sub-menu added, because no MIME types are specified." << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": No recent files sub-menu added, because no MIME types are specified." << std::endl;
   }
 }
 
diff --git a/glom/base_db.cc b/glom/base_db.cc
index 3ad66e0..8401dde 100644
--- a/glom/base_db.cc
+++ b/glom/base_db.cc
@@ -394,12 +394,12 @@ Glib::RefPtr<Gnome::Gda::Connection> Base_DB::get_connection()
   }
   catch (const Glib::Error& error)
   {
-    std::cerr << "Base_DB::get_connection(): " << error.what() << std::endl;
+    std::cerr << G_STRFUNC << ": " << error.what() << std::endl;
   }
 
   if(!sharedconnection)
   {
-    std::cerr << "Base_DB::get_connection(): No connection yet." << std::endl;
+    std::cerr << G_STRFUNC << ": No connection yet." << std::endl;
     return Glib::RefPtr<Gnome::Gda::Connection>(0);
   }
 
@@ -603,7 +603,7 @@ void Base_DB::fill_full_field_details(const Glib::ustring& parent_table_name, sh
 {
   if(!layout_item)
   {
-    std::cerr << "Base_DB::fill_full_field_details(): layout_item was null." << std::endl;
+    std::cerr << G_STRFUNC << ": layout_item was null." << std::endl;
   }
 
   const Glib::ustring table_name = layout_item->get_table_used(parent_table_name);
@@ -611,7 +611,7 @@ void Base_DB::fill_full_field_details(const Glib::ustring& parent_table_name, sh
   Document* document = get_document();
   if(!document)
   {
-    std::cerr << "Base_DB::fill_full_field_details(): document was null." << std::endl;
+    std::cerr << G_STRFUNC << ": document was null." << std::endl;
   }
 
   layout_item->set_full_field_details( get_document()->get_field(table_name, layout_item->get_name()) );
@@ -692,7 +692,7 @@ sharedptr<Field> Base_DB::get_field_primary_key_for_table(const Glib::ustring& t
   {
     //TODO_Performance: Cache this result?
     Document::type_vec_fields fields = document->get_table_fields(table_name);
-    //std::cout << "Base_DB::get_field_primary_key_for_table(): table=" << table_name << ", fields count=" << fields.size() << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": table=" << table_name << ", fields count=" << fields.size() << std::endl;
     for(Document::type_vec_fields::iterator iter = fields.begin(); iter != fields.end(); ++iter)
     {
       sharedptr<Field> field = *iter;
@@ -743,7 +743,7 @@ void Base_DB::get_table_fields_to_show_for_sequence_add_group(const Glib::ustrin
         }
         else
         {
-          std::cerr << "Base_DB::get_table_fields_to_show_for_sequence_add_group(): related field not found: field=" << item->get_layout_display_name() << std::endl;
+          std::cerr << G_STRFUNC << ": related field not found: field=" << item->get_layout_display_name() << std::endl;
         }
       }
       else //It's a regular field in the table:
@@ -756,7 +756,7 @@ void Base_DB::get_table_fields_to_show_for_sequence_add_group(const Glib::ustrin
           sharedptr<LayoutItem_Field> layout_item = item_field;
           layout_item->set_full_field_details(*iterFind); //Fill the LayoutItem with the full field information.
 
-          //std::cout << "get_table_fields_to_show_for_sequence_add_group(): name=" << layout_item->get_name() << std::endl;
+          //std::cout << "debug: " << G_STRFUNC << ": name=" << layout_item->get_name() << std::endl;
 
           //Prevent editing of the field if the user may not edit this table:
           layout_item->m_priv_view = table_privs.m_view;
@@ -1082,7 +1082,7 @@ Base_DB::type_map_fields Base_DB::get_record_field_values_for_calculation(const
       }
       catch(const Glib::Exception& ex)
       {
-        std::cerr << "Base_DB::get_record_field_values_for_calculation(): Exception while executing SQL: " << query << std::endl;
+        std::cerr << G_STRFUNC << ": Exception while executing SQL: " << query << std::endl;
         handle_error(ex);
         return field_values;
       }
@@ -1151,13 +1151,13 @@ bool Base_DB::set_field_value_in_database(const LayoutFieldInRecord& layoutfield
   //row is invalid, and ignored, for Box_Data_Details.
   if(!(field_in_record.m_field))
   {
-    std::cerr << "Base_DB::set_field_value_in_database(): field_in_record.m_field is empty." << std::endl;
+    std::cerr << G_STRFUNC << ": field_in_record.m_field is empty." << std::endl;
     return false;
   }
 
   if(!(field_in_record.m_key))
   {
-    std::cerr << "Base_DB::set_field_value_in_database(): field_in_record.m_key is empty." << std::endl;
+    std::cerr << G_STRFUNC << ": field_in_record.m_key is empty." << std::endl;
     return false;
   }
 
@@ -1177,7 +1177,7 @@ bool Base_DB::set_field_value_in_database(const LayoutFieldInRecord& layoutfield
       const bool test = DbUtils::query_execute(builder); //TODO: Respond to failure.
       if(!test)
       {
-        std::cerr << "Box_Data::set_field_value_in_database(): UPDATE failed." << std::endl;
+        std::cerr << G_STRFUNC << ": UPDATE failed." << std::endl;
         return false; //failed.
       }
     }
@@ -1219,13 +1219,13 @@ Gnome::Gda::Value Base_DB::get_field_value_in_database(const LayoutFieldInRecord
   //row is invalid, and ignored, for Box_Data_Details.
   if(!(field_in_record.m_field))
   {
-    std::cerr << "Base_DB:gset_field_value_in_database(): field_in_record.m_field is empty." << std::endl;
+    std::cerr << G_STRFUNC << ": field_in_record.m_field is empty." << std::endl;
     return result;
   }
 
   if(!(field_in_record.m_key))
   {
-    std::cerr << "Base_DB::get_field_value_in_database(): field_in_record.m_key is empty." << std::endl;
+    std::cerr << G_STRFUNC << ": field_in_record.m_key is empty." << std::endl;
     return result;
   }
 
@@ -1258,13 +1258,13 @@ Gnome::Gda::Value Base_DB::get_field_value_in_database(const sharedptr<Field>& f
   //row is invalid, and ignored, for Box_Data_Details.
   if(!field)
   {
-    std::cerr << "Base_DB:gset_field_value_in_database(): field is empty." << std::endl;
+    std::cerr << G_STRFUNC << ": field is empty." << std::endl;
     return result;
   }
 
   if(found_set.m_where_clause.empty())
   {
-    std::cerr << "Base_DB::get_field_value_in_database(): where_clause is empty." << std::endl;
+    std::cerr << G_STRFUNC << ": where_clause is empty." << std::endl;
     return result;
   }
 
@@ -1297,7 +1297,7 @@ Gnome::Gda::Value Base_DB::get_field_value_in_database(const sharedptr<Field>& f
 
 void Base_DB::do_calculations(const LayoutFieldInRecord& field_changed, bool first_calc_field)
 {
-  //std::cout << "debug: Base_DB::do_calcualtions(): field_changed=" << field_changed.m_field->get_name() << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": field_changed=" << field_changed.m_field->get_name() << std::endl;
 
   if(first_calc_field)
   {
@@ -1451,12 +1451,12 @@ void Base_DB::do_lookups(const LayoutFieldInRecord& field_in_record, const Gtk::
    //TODO_performance: There is a LOT of iterating and copying here.
    const Glib::ustring strFieldName = field_in_record.m_field->get_name();
    const type_list_lookups lookups = get_lookup_fields(field_in_record.m_table_name, strFieldName);
-   //std::cout << "Base_DB::do_lookups(): lookups size=" << lookups.size() << std::endl;
+   //std::cout << "debug: " << G_STRFUNC << ": lookups size=" << lookups.size() << std::endl;
    for(type_list_lookups::const_iterator iter = lookups.begin(); iter != lookups.end(); ++iter)
    {
      sharedptr<const LayoutItem_Field> layout_item = iter->first;
 
-     //std::cout << "Base_DB::do_lookups(): item=" << layout_item->get_name() << std::endl;
+     //std::cout << "debug: " << G_STRFUNC << ": item=" << layout_item->get_name() << std::endl;
 
      sharedptr<const Relationship> relationship = iter->second;
      const sharedptr<const Field> field_lookup = layout_item->get_full_field_details();
@@ -1583,7 +1583,7 @@ bool Base_DB::get_field_value_is_unique(const Glib::ustring& table_name, const s
   Glib::RefPtr<const Gnome::Gda::DataModel> data_model = DbUtils::query_execute_select(builder);
   if(data_model)
   {
-    //std::cout << "debug: Base_DB::get_field_value_is_unique(): table_name=" << table_name << ", field name=" << field->get_name() << ", value=" << value.to_string() << ", rows count=" << data_model->get_n_rows() << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": table_name=" << table_name << ", field name=" << field->get_name() << ", value=" << value.to_string() << ", rows count=" << data_model->get_n_rows() << std::endl;
     //The value is unique for this field, if the query returned no existing rows:
 
     result = (data_model->get_n_rows() == 0);
@@ -1609,7 +1609,7 @@ bool Base_DB::check_entered_value_for_uniqueness(const Glib::ustring& table_name
   {
     if(!get_field_value_is_unique(table_name, layout_field, field_value))
     {
-      //std::cout << "debug Base_DB::check_entered_value_for_uniqueness(): field=" << layout_field->get_name() << ", value is not unique: " << field_value.to_string() << std::endl;
+      //std::cout << "debug: " << G_STRFUNC << ": field=" << layout_field->get_name() << ", value is not unique: " << field_value.to_string() << std::endl;
 
       //Warn the user and revert the value:
       if(parent_window)
@@ -1763,7 +1763,7 @@ bool Base_DB::get_primary_key_is_in_foundset(const FoundSet& found_set, const Gn
   sharedptr<const Field> primary_key = get_field_primary_key_for_table(found_set.m_table_name);
   if(!primary_key)
   {
-    std::cerr << "Base_DB::get_primary_key_is_in_foundset(): No primary key found for table: " << found_set.m_table_name << std::endl;
+    std::cerr << G_STRFUNC << ": No primary key found for table: " << found_set.m_table_name << std::endl;
     return false;
   }
 
@@ -1812,7 +1812,7 @@ int Base_DB::count_rows_returned_by(const Glib::RefPtr<Gnome::Gda::SqlBuilder>&
 {
   if(!sql_query)
   {
-    std::cerr << "Base_DB::count_rows_returned_by(): sql_query was null." << std::endl;
+    std::cerr << G_STRFUNC << ": sql_query was null." << std::endl;
     return 0;
   }
 
@@ -1843,7 +1843,7 @@ int Base_DB::count_rows_returned_by(const Glib::RefPtr<Gnome::Gda::SqlBuilder>&
         result = value.get_int();
     }
 
-  //std::cout << "DEBUG: count_rows_returned_by(): Returning " << result << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": Returning " << result << std::endl;
   return result;
 }
 
@@ -1918,7 +1918,7 @@ bool Base_DB::add_user(const Glib::ustring& user, const Glib::ustring& password,
   bool test = DbUtils::query_execute_string(strQuery);
   if(!test)
   {
-    std::cerr << "Base_DB::add_user(): CREATE USER failed." << std::endl;
+    std::cerr << G_STRFUNC << ": CREATE USER failed." << std::endl;
     return false;
   }
 
@@ -1927,7 +1927,7 @@ bool Base_DB::add_user(const Glib::ustring& user, const Glib::ustring& password,
   test = DbUtils::query_execute_string(strQuery);
   if(!test)
   {
-    std::cerr << "Base_DB::add_user(): ALTER GROUP failed." << std::endl;
+    std::cerr << G_STRFUNC << ": ALTER GROUP failed." << std::endl;
     return false;
   }
 
@@ -1943,7 +1943,7 @@ bool Base_DB::add_user(const Glib::ustring& user, const Glib::ustring& password,
     const Glib::ustring strQuery = "REVOKE ALL PRIVILEGES ON \"" + (*iter)->get_name() + "\" FROM \"" + user + "\"";
     const bool test = DbUtils::query_execute_string(strQuery);
     if(!test)
-      std::cerr << "Base_DB::add_user(): REVOKE failed." << std::endl;
+      std::cerr << G_STRFUNC << ": REVOKE failed." << std::endl;
   }
 
   return true;
@@ -1959,7 +1959,7 @@ bool Base_DB::remove_user(const Glib::ustring& user)
   const bool test = DbUtils::query_execute_string(strQuery);
   if(!test)
   {
-    std::cerr << "Base_DB::remove_user(): DROP USER failed" << std::endl;
+    std::cerr << G_STRFUNC << ": DROP USER failed" << std::endl;
     return false;
   }
 
@@ -1975,7 +1975,7 @@ bool Base_DB::remove_user_from_group(const Glib::ustring& user, const Glib::ustr
   const bool test = DbUtils::query_execute_string(strQuery);
   if(!test)
   {
-    std::cerr << "Base_DB::remove_user_from_group(): ALTER GROUP failed." << std::endl;
+    std::cerr << G_STRFUNC << ": ALTER GROUP failed." << std::endl;
     return false;
   }
 
@@ -1996,7 +1996,7 @@ bool Base_DB::set_database_owner_user(const Glib::ustring& user)
   const bool test = DbUtils::query_execute_string(strQuery);
   if(!test)
   {
-    std::cerr << "Base_DB::set_database_owner_user(): ALTER DATABASE failed." << std::endl;
+    std::cerr << G_STRFUNC << ": ALTER DATABASE failed." << std::endl;
     return false;
   }
 
@@ -2020,7 +2020,7 @@ bool Base_DB::disable_user(const Glib::ustring& user)
   const bool test = DbUtils::query_execute_string(strQuery);
   if(!test)
   {
-    std::cerr << "Base_DB::remove_user(): DROP USER failed" << std::endl;
+    std::cerr << G_STRFUNC << ": DROP USER failed" << std::endl;
     return false;
   }
 
diff --git a/glom/base_db_table_data.cc b/glom/base_db_table_data.cc
index 27e6246..f631840 100644
--- a/glom/base_db_table_data.cc
+++ b/glom/base_db_table_data.cc
@@ -208,7 +208,7 @@ bool Base_DB_Table_Data::record_new(bool use_entered_data, const Gnome::Gda::Val
   {
     const bool test = DbUtils::query_execute(builder);
     if(!test)
-      std::cerr << "Box_Data::record_new(): INSERT failed." << std::endl;
+      std::cerr << G_STRFUNC << ": INSERT failed." << std::endl;
     else
     {
       Gtk::TreeModel::iterator row = get_row_selected(); //Null and ignored for details views.
@@ -237,7 +237,7 @@ bool Base_DB_Table_Data::record_new(bool use_entered_data, const Gnome::Gda::Val
     }
   }
   else
-    std::cerr << "Base_DB_Table_Data::record_new(): Empty field names or values." << std::endl;
+    std::cerr << G_STRFUNC << ": Empty field names or values." << std::endl;
 
   return false; //Failed.
 }
@@ -363,7 +363,7 @@ bool Base_DB_Table_Data::add_related_record_for_field(const sharedptr<const Layo
       const bool test = DbUtils::query_execute(builder);
       if(!test)
       {
-        std::cerr << "Base_DB_Table_Data::add_related_record_for_field(): INSERT failed." << std::endl;
+        std::cerr << G_STRFUNC << ": INSERT failed." << std::endl;
         return false;
       }
 
@@ -380,7 +380,7 @@ bool Base_DB_Table_Data::add_related_record_for_field(const sharedptr<const Layo
         sharedptr<Field> field_from_key = get_fields_for_table_one_field(relationship->get_from_table(), relationship->get_from_field()); //TODO_Performance.
         if(!field_from_key)
         {
-          std::cerr << "Base_DB_Table_Data::add_related_record_for_field(): get_fields_for_table_one_field() failed." << std::endl;
+          std::cerr << G_STRFUNC << ": get_fields_for_table_one_field() failed." << std::endl;
           return false;
         }
 
@@ -413,7 +413,7 @@ bool Base_DB_Table_Data::add_related_record_for_field(const sharedptr<const Layo
             const bool test = DbUtils::query_execute(builder);
             if(!test)
             {
-              std::cerr << "Base_DB_Table_Data::add_related_record_for_field(): UPDATE failed." << std::endl;
+              std::cerr << G_STRFUNC << ": UPDATE failed." << std::endl;
               return false;
             }
           }
@@ -499,12 +499,12 @@ void Base_DB_Table_Data::refresh_related_fields(const LayoutFieldInRecord& field
   if(!fieldsToGet.empty())
   {
     Glib::RefPtr<Gnome::Gda::SqlBuilder> query = Utils::build_sql_select_with_key(field_in_record_changed.m_table_name, fieldsToGet, field_in_record_changed.m_key, field_in_record_changed.m_key_value);
-    //std::cout << "DEBUG: Base_DB_Table_Data::refresh_related_fields(): query=" << query << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": query=" << query << std::endl;
 
     Glib::RefPtr<const Gnome::Gda::DataModel> result = DbUtils::query_execute_select(query);
     if(!result)
     {
-      std::cerr << "Base_DB_Table_Data::refresh_related_fields(): no result." << std::endl;
+      std::cerr << G_STRFUNC << ": no result." << std::endl;
       handle_error();
     }
     else
@@ -517,7 +517,7 @@ void Base_DB_Table_Data::refresh_related_fields(const LayoutFieldInRecord& field
         const guint cols_count = result->get_n_columns();
         if(cols_count <= 0)
         {
-          std::cerr << "Base_DB_Table_Data::refresh_related_fields(): The result had 0 columns" << std::endl;
+          std::cerr << G_STRFUNC << ": The result had 0 columns" << std::endl;
         }
 
         for(guint uiCol = 0; uiCol < cols_count; ++uiCol)
@@ -525,11 +525,11 @@ void Base_DB_Table_Data::refresh_related_fields(const LayoutFieldInRecord& field
           const Gnome::Gda::Value value = result->get_value_at(uiCol, 0 /* row */);
           sharedptr<LayoutItem_Field> layout_item = *iterFields;
           if(!layout_item)
-            std::cerr << "Base_DB_Table_Data::refresh_related_fields(): The layout_item was null." << std::endl;
+            std::cerr << G_STRFUNC << ": The layout_item was null." << std::endl;
           else
           {
-            //std::cout << "DEBUG: Box_Data_List::refresh_related_fields(): field_name=" << layout_item->get_name() << std::endl;
-            //std::cout << "  DEBUG: Box_Data_List::refresh_related_fields(): value_as_string=" << value.to_string()  << std::endl;
+            //std::cout << "debug: " << G_STRFUNC << ": field_name=" << layout_item->get_name() << std::endl;
+            //std::cout << "debug: " << G_STRFUNC << ": value_as_string=" << value.to_string()  << std::endl;
 
             //m_AddDel.set_value(row, layout_item, value);
             set_entered_field_data(row, layout_item, value);
@@ -540,7 +540,7 @@ void Base_DB_Table_Data::refresh_related_fields(const LayoutFieldInRecord& field
         }
       }
       else
-        std::cerr << "Base_DB_Table_Data::refresh_related_fields(): no records found." << std::endl;
+        std::cerr << G_STRFUNC << ": no records found." << std::endl;
     }
   }
 }
diff --git a/glom/dialog_connection.cc b/glom/dialog_connection.cc
index d43884d..0d65ab0 100644
--- a/glom/dialog_connection.cc
+++ b/glom/dialog_connection.cc
@@ -79,7 +79,7 @@ sharedptr<SharedConnection> Dialog_Connection::connect_to_server_with_connection
   if(!document)
     return result;
 
-  //std::cout << "debug: Dialog_Connection::connect_to_server_with_connection_settings(): m_database_name=" << m_database_name << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": m_database_name=" << m_database_name << std::endl;
   connection_pool->set_database(m_database_name);
 
 #ifdef GLOM_ENABLE_POSTGRESQL
diff --git a/glom/dialog_existing_or_new.cc b/glom/dialog_existing_or_new.cc
index 4d46d54..72bc9da 100644
--- a/glom/dialog_existing_or_new.cc
+++ b/glom/dialog_existing_or_new.cc
@@ -270,7 +270,7 @@ Dialog_ExistingOrNew::Dialog_ExistingOrNew(BaseObjectType* cobject, const Glib::
 #ifndef GLOM_ENABLE_CLIENT_ONLY
 bool Dialog_ExistingOrNew::list_examples_at_path(const std::string& path)
 {
-  //std::cout << "Debug: Dialog_ExistingOrNew::list_examples_at_path(): path=" << path << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": path=" << path << std::endl;
 
   m_examples_dir = Gio::File::create_for_path(path);
 
diff --git a/glom/frame_glom.cc b/glom/frame_glom.cc
index 1c4e697..7d41411 100644
--- a/glom/frame_glom.cc
+++ b/glom/frame_glom.cc
@@ -496,7 +496,7 @@ void Frame_Glom::show_table_allow_empty(const Glib::ustring& table_name, const G
     }
     default:
     {
-      std::cout << "Frame_Glom::on_box_tables_selected(): Unexpected mode" << std::endl;
+      std::cout << "debug: " << G_STRFUNC << ": Unexpected mode" << std::endl;
       strMode = _("Unknown");
       break;
     }
@@ -683,7 +683,7 @@ void Frame_Glom::export_data_to_vector(Document::type_example_rows& the_vector,
 
   if(fieldsSequence.empty())
   {
-    std::cerr << "Glom: Frame_Glom::export_data_to_string(): No fields in sequence." << std::endl;
+    std::cerr << G_STRFUNC << ": No fields in sequence." << std::endl;
     return;
   }
 
@@ -733,7 +733,7 @@ void Frame_Glom::export_data_to_string(Glib::ustring& the_string, const FoundSet
 
   if(fieldsSequence.empty())
   {
-    std::cerr << "Glom: Frame_Glom::export_data_to_string(): No fields in sequence." << std::endl;
+    std::cerr << G_STRFUNC << ": No fields in sequence." << std::endl;
     return;
   }
 
@@ -785,7 +785,7 @@ void Frame_Glom::export_data_to_stream(std::ostream& the_stream, const FoundSet&
 
   if(fieldsSequence.empty())
   {
-    std::cerr << "Glom: Frame_Glom::export_data_to_stream(): No fields in sequence." << std::endl;
+    std::cerr << G_STRFUNC << ": No fields in sequence." << std::endl;
     return;
   }
 
@@ -820,7 +820,7 @@ void Frame_Glom::export_data_to_stream(std::ostream& the_stream, const FoundSet&
             sharedptr<const Field> field = layout_item->get_full_field_details();
             if(!field)
             {
-              std::cerr << "Glom: Frame_Glom::export_data_to_stream(): A field was null." << std::endl;
+              std::cerr << G_STRFUNC << ": A field was null." << std::endl;
               return;
             }
 
@@ -931,7 +931,7 @@ void Frame_Glom::on_menu_file_toggle_share(const Glib::RefPtr<Gtk::ToggleAction>
 {
   if(!action)
   {
-    std::cerr << "Frame_Glom::on_menu_file_toggle_share(): action was null." << std::endl;
+    std::cerr << G_STRFUNC << ": action was null." << std::endl;
   }
 
   //Prevent this change if not in developer mode,
@@ -1038,7 +1038,7 @@ void Frame_Glom::on_menu_file_toggle_share(const Glib::RefPtr<Gtk::ToggleAction>
 
           if(!reowned || !(removed || disabled))
           {
-            std::cerr << "Frame_Glom::on_menu_file_toggle_share(): Failed to reown and remove/revoke default user." << std::endl;
+            std::cerr << G_STRFUNC << ": Failed to reown and remove/revoke default user." << std::endl;
             shared = false;
             change = false;
           }
@@ -1307,7 +1307,7 @@ void Frame_Glom::on_dialog_add_related_table_response(int response)
       const bool result = DbUtils::create_table_with_default_fields(get_document(), table_name);
       if(!result)
       {
-        std::cerr << "Frame_Glom::on_menu_Tables_AddRelatedTable(): create_table_with_default_fields() failed." << std::endl;
+        std::cerr << G_STRFUNC << ": create_table_with_default_fields() failed." << std::endl;
         return;
       }
 
@@ -1323,7 +1323,7 @@ void Frame_Glom::on_dialog_add_related_table_response(int response)
       sharedptr<Field> related_primary_key = get_field_primary_key_for_table(table_name); //This field was created by create_table_with_default_fields().
       if(!related_primary_key)
       {
-        std::cerr << "Frame_Glom::on_menu_Tables_AddRelatedTable(): get_field_primary_key_for_table() failed." << std::endl;
+        std::cerr << G_STRFUNC << ": get_field_primary_key_for_table() failed." << std::endl;
         return;
       }
 
@@ -1465,14 +1465,14 @@ void Frame_Glom::on_button_quickfind()
   else
   {
     const Gnome::Gda::SqlExpr where_clause = Utils::get_find_where_clause_quick(get_document(), m_table_name, Gnome::Gda::Value(criteria));
-    //std::cout << "Frame_Glom::on_button_quickfind(): where_clause=" << where_clause << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": where_clause=" << where_clause << std::endl;
     on_notebook_find_criteria(where_clause);
   }
 }
 
 void Frame_Glom::on_notebook_find_criteria(const Gnome::Gda::SqlExpr& where_clause)
 {
-  //std::cout << "Frame_Glom::on_notebook_find_criteria(): " << where_clause << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": " << where_clause << std::endl;
 
   Application* pApp = dynamic_cast<Application*>(get_app_window());
   if(pApp)
@@ -1490,9 +1490,9 @@ void Frame_Glom::on_notebook_find_criteria(const Gnome::Gda::SqlExpr& where_clau
       found_set.m_where_clause = where_clause;
       records_found = m_Notebook_Data.init_db_details(found_set);
 
-      //std::cout << "Frame_Glom::on_notebook_find_criteria(): BEFORE  m_Notebook_Data.select_page_for_find_results()" << std::endl;
+      //std::cout << "debug: " << G_STRFUNC << ": BEFORE  m_Notebook_Data.select_page_for_find_results()" << std::endl;
       m_Notebook_Data.select_page_for_find_results();
-      //std::cout << "Frame_Glom::on_notebook_find_criteria(): AFTER  m_Notebook_Data.select_page_for_find_results()" << std::endl;
+      //std::cout << "debug: " << G_STRFUNC << ": AFTER  m_Notebook_Data.select_page_for_find_results()" << std::endl;
     }
 
     if(!records_found)
@@ -2209,7 +2209,7 @@ bool Frame_Glom::connection_request_password_and_choose_new_database_name()
       }
       else
       {
-        std::cout << "Frame_Glom::connection_request_password_and_choose_new_database_name(): unused database name successfully found: " << database_name_possible << std::endl;
+        std::cout << "debug: " << G_STRFUNC << ": unused database name successfully found: " << database_name_possible << std::endl;
         //The connection to the server is OK, but the specified database does not exist.
         //That's good - we were looking for an unused database name.
 
@@ -2294,7 +2294,7 @@ bool Frame_Glom::handle_request_password_connection_error(bool asked_for_passwor
   }
   else
   {
-    std::cerr << "Frame_Glom::connection_request_password_and_attempt(): Unexpected exception: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Unexpected exception: " << ex.what() << std::endl;
     cleanup_connection();
     return false;
   }
diff --git a/glom/glade_utils.cc b/glom/glade_utils.cc
index ad3a34c..7109bb1 100644
--- a/glom/glade_utils.cc
+++ b/glom/glade_utils.cc
@@ -31,7 +31,7 @@ namespace Utils
 Dialog_ProgressCreating* get_and_show_pulse_dialog(const Glib::ustring& message, Gtk::Window* parent_window)
 {
   if(!parent_window)
-    std::cerr << "debug: Glom: get_and_show_pulse_dialog(): parent_window is NULL" << std::endl;
+    std::cerr << G_STRFUNC << ": parent_window is NULL" << std::endl;
 
   Dialog_ProgressCreating* dialog_progress = 0;
   Utils::get_glade_widget_derived_with_warning(dialog_progress);
diff --git a/glom/import_csv/csv_parser.cc b/glom/import_csv/csv_parser.cc
index d9b8f54..3ada20f 100644
--- a/glom/import_csv/csv_parser.cc
+++ b/glom/import_csv/csv_parser.cc
@@ -107,14 +107,14 @@ const Glib::ustring& CsvParser::get_data(guint row, guint col)
 
   if(row >= m_rows.size())
   {
-    //std::cerr << "CsvParser::get_data(): row out of range." << std::endl;
+    //std::cerr << G_STRFUNC << ": get_data(): row out of range." << std::endl;
     return empty_result;
   }
 
   const type_row_strings& row_data = m_rows[row];
   if(col >= row_data.size())
   {
-    //std::cerr << "CsvParser::get_data(): col out of range." << std::endl;
+    //std::cerr << G_STRFUNC << ": get_data(): col out of range." << std::endl;
     return empty_result;
   }
 
@@ -366,7 +366,7 @@ bool CsvParser::on_idle_parse()
       // contain null bytes this only occurs when converting, for example, a UTF-16
       // file from ISO-8859-1 to UTF-8 (note that the UTF-16 file is valid ISO-8859-1 - 
       // it just contains lots of nullbytes). We therefore produce an error here.
-      //std::cerr << "CsvParser::on_idle_parse(): Encoding error" << std::endl;
+      //std::cerr << G_STRFUNC << ": on_idle_parse(): Encoding error" << std::endl;
       set_state(STATE_ENCODING_ERROR);
       signal_encoding_error().emit();
       return false;  //Stop calling the idle handler.
diff --git a/glom/import_csv/dialog_import_csv_progress.cc b/glom/import_csv/dialog_import_csv_progress.cc
index dc9d90a..e334678 100644
--- a/glom/import_csv/dialog_import_csv_progress.cc
+++ b/glom/import_csv/dialog_import_csv_progress.cc
@@ -224,9 +224,9 @@ bool Dialog_Import_CSV_Progress::on_idle_import()
   }
   else
   {
-    std::cout << "Dialog_Import_CSV_Progress::on_idle_import(): Calling record_new() with primary_key_value=" << primary_key_value.to_string() << " ..." << std::endl;
+    std::cout << "debug: " << G_STRFUNC << ": Calling record_new() with primary_key_value=" << primary_key_value.to_string() << " ..." << std::endl;
     record_new(true /* use_entered_data */, primary_key_value);
-    std::cout << "Dialog_Import_CSV_Progress::on_idle_import(): ... Finished calling record_new()" << std::endl;
+    std::cout << "debug: " << G_STRFUNC << ": ... Finished calling record_new()" << std::endl;
   }
 
   m_current_row_values.clear();
diff --git a/glom/libglom/connectionpool.cc b/glom/libglom/connectionpool.cc
index 380e460..9af4103 100644
--- a/glom/libglom/connectionpool.cc
+++ b/glom/libglom/connectionpool.cc
@@ -160,7 +160,7 @@ void ConnectionPool::setup_from_document(const Document* document)
 
   default:
     //on_document_load() should have checked for this already, informing the user.
-    std::cerr << "Glom: setup_connection_pool_from_document(): Unhandled hosting mode: " << document->get_hosting_mode() << std::endl;
+    std::cerr << G_STRFUNC << ": Unhandled hosting mode: " << document->get_hosting_mode() << std::endl;
     g_assert_not_reached();
     break;
   }
@@ -219,7 +219,7 @@ sharedptr<SharedConnection> ConnectionPool::get_and_connect()
 
   if(!(connection_pool->m_backend.get()))
   {
-    std::cerr << "ConnectionPool::get_and_connect(): m_backend is null." << std::endl;
+    std::cerr << G_STRFUNC << ": m_backend is null." << std::endl;
     return result; //TODO: Return a FAILURE_NO_BACKEND error?, though that would be tedious.
   }
 
@@ -307,7 +307,7 @@ sharedptr<SharedConnection> ConnectionPool::connect()
         }
         catch(const Glib::Error& ex)
         {
-          std::cerr << "ConnectionPool::connect(): update_meta_store_data_types() failed: " << ex.what() << std::endl;
+          std::cerr << G_STRFUNC << ": update_meta_store_data_types() failed: " << ex.what() << std::endl;
         }
         //std::cout << "DEBUG: ... update_meta_store_data_types() has finished." << std::endl;
 
@@ -321,7 +321,7 @@ sharedptr<SharedConnection> ConnectionPool::connect()
         }
         catch(const Glib::Error& ex)
         {
-          std::cerr << "ConnectionPool::connect(): update_meta_store_table_names() failed: " << ex.what() << std::endl;
+          std::cerr << G_STRFUNC << ": update_meta_store_table_names() failed: " << ex.what() << std::endl;
         }
         //std::cout << "DEBUG: ... update_meta_store_table_names() has finished." << std::endl;
 
@@ -364,7 +364,7 @@ void ConnectionPool::set_user(const Glib::ustring& value)
   if(value.empty())
   {
 #ifdef GLOM_CONNECTION_DEBUG
-    std::cout << "debug: ConnectionPool::set_user(): user is empty." << std::endl;
+    std::cout << "debug: " << G_STRFUNC << ": user is empty." << std::endl;
 #endif
   }
 
@@ -602,7 +602,7 @@ bool ConnectionPool::add_column(const Glib::ustring& table_name, const sharedptr
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << "ConnectionPool::add_column(): exception:" << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": exception:" << ex.what() << std::endl;
   }
   
   return false;
@@ -627,7 +627,7 @@ bool ConnectionPool::drop_column(const Glib::ustring& table_name, const Glib::us
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << "ConnectionPool::drop_column(): exception:" << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": exception:" << ex.what() << std::endl;
   }
   
   return false;
@@ -670,7 +670,7 @@ Document* ConnectionPool::get_document()
 {
   if(!m_slot_get_document)
   {
-    std::cerr << "Glom ConnectionPool::get_document(): m_slot_get_document is null." << std::endl;
+    std::cerr << G_STRFUNC << ": m_slot_get_document is null." << std::endl;
     return 0;
   }
 
@@ -690,7 +690,7 @@ EpcContents* ConnectionPool::on_publisher_document_requested(EpcPublisher* /* pu
     return 0;
 
   const Glib::ustring contents = document->get_contents();
-  //std::cout << "DEBUG: ConnectionPool::on_publisher_document_requested(): returning: " << std::endl << "  " << contents << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": returning: " << std::endl << "  " << contents << std::endl;
   return epc_contents_new_dup ("text/plain", (void*)contents.c_str(), -1);
 }
 
@@ -709,7 +709,7 @@ gboolean ConnectionPool::on_publisher_document_authentication(EpcAuthContext* co
   const gchar* password = epc_auth_context_get_password(context);
   g_return_val_if_fail(password, false); //TODO: This seems to happen once before this callback is called again properly.
 
-  //std::cout << "ConnectionPool::on_publisher_document_authentication(): username=" << user_name << ", password=" << password << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": username=" << user_name << ", password=" << password << std::endl;
 
   g_return_val_if_fail(connection_pool->m_backend.get(), false);
 
@@ -719,12 +719,12 @@ gboolean ConnectionPool::on_publisher_document_authentication(EpcAuthContext* co
 
   if(connection)
   {
-    //std::cout << "ConnectionPool::on_publisher_document_authentication(): succeeded." << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": succeeded." << std::endl;
     return true; //Succeeded.
   }
   else
   {
-    //std::cout << "ConnectionPool::on_publisher_document_authentication(): failed." << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": failed." << std::endl;
     return false; //Failed.
   }
 }
@@ -816,7 +816,7 @@ void ConnectionPool::avahi_start_publishing()
   if(error)
   {
 #ifdef GLOM_CONNECTION_DEBUG
-    std::cout << "Glom: ConnectionPool::avahi_start_publishing(): Error while running epc_publisher_run_async: " << error->message << std::endl;
+    std::cout << "debug: " << G_STRFUNC << ": Error while running epc_publisher_run_async: " << error->message << std::endl;
 #endif
     g_clear_error(&error);
   }
diff --git a/glom/libglom/connectionpool_backends/postgres.cc b/glom/libglom/connectionpool_backends/postgres.cc
index b70669a..4525896 100644
--- a/glom/libglom/connectionpool_backends/postgres.cc
+++ b/glom/libglom/connectionpool_backends/postgres.cc
@@ -73,7 +73,7 @@ Glib::RefPtr<Gnome::Gda::Connection> Postgres::attempt_connect(const Glib::ustri
  
 #ifdef GLOM_CONNECTION_DEBUG          
   std::cout << std::endl << "DEBUG: Glom: trying to connect on port=" << port << std::endl;
-  std::cout << "DEBUG: ConnectionPoolBackends::Postgres::attempt_connect(): cnc_string=" << cnc_string << std::endl;
+  std::cout << "debug: " << G_STRFUNC << ": cnc_string=" << cnc_string << std::endl;
   std::cout << "  DEBUG: auth_string=" << auth_string << std::endl;
 #endif
 
@@ -90,8 +90,8 @@ Glib::RefPtr<Gnome::Gda::Connection> Postgres::attempt_connect(const Glib::ustri
   {
 
 #ifdef GLOM_CONNECTION_DEBUG
-    std::cout << "ConnectionPoolBackends::Postgres::attempt_connect(): Attempt to connect to database failed on port=" << port << ", database=" << database << ": " << ex.what() << std::endl;
-    std::cout << "ConnectionPoolBackends::Postgres::attempt_connect(): Attempting to connect without specifying the database." << std::endl;
+    std::cout << "debug: " << G_STRFUNC << ": Attempt to connect to database failed on port=" << port << ", database=" << database << ": " << ex.what() << std::endl;
+    std::cout << "debug: " << G_STRFUNC << ": Attempting to connect without specifying the database." << std::endl;
 #endif
 
     const Glib::ustring cnc_string = cnc_string_main + ";DB_NAME=" + default_database;
@@ -152,7 +152,7 @@ bool Postgres::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connec
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << "Postgres::change_columns(): begin_transaction failed: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": begin_transaction failed: " << ex.what() << std::endl;
   }
 
   //Do this all in one big try/catch, block, 
@@ -377,7 +377,7 @@ bool Postgres::attempt_create_database(const Glib::ustring& database_name, const
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << "Postgres::attempt_create_database(): exception: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": exception: " << ex.what() << std::endl;
     return false;
   }
 
diff --git a/glom/libglom/connectionpool_backends/postgres_self.cc b/glom/libglom/connectionpool_backends/postgres_self.cc
index 6e1f58e..eb68609 100644
--- a/glom/libglom/connectionpool_backends/postgres_self.cc
+++ b/glom/libglom/connectionpool_backends/postgres_self.cc
@@ -223,7 +223,7 @@ Backend::InitErrors PostgresSelfHosted::initialize(const SlotProgress& slot_prog
 
   if(m_self_hosting_data_uri.empty())
   {
-    std::cerr << "PostgresSelfHosted::initialize: m_self_hosting_data_uri is empty." << std::endl;
+    std::cerr << G_STRFUNC << ": initialize: m_self_hosting_data_uri is empty." << std::endl;
     return INITERROR_OTHER;
   }
   
@@ -427,7 +427,7 @@ bool PostgresSelfHosted::startup(const SlotProgress& slot_progress, bool network
   if(!(directory_exists_uri(dbdir_uri)))
   {
     //TODO: Use a return enum or exception so we can tell the user about this:
-    std::cerr << "ConnectionPool::create_self_hosting(): The data directory could not be found: " << dbdir_uri << std::endl;
+    std::cerr << G_STRFUNC << ": The data directory could not be found: " << dbdir_uri << std::endl;
     return false;
   }
 
@@ -442,17 +442,17 @@ bool PostgresSelfHosted::startup(const SlotProgress& slot_progress, bool network
   if(!(directory_exists_uri(dbdir_data_uri)))
   {
     //TODO: Use a return enum or exception so we can tell the user about this:
-    std::cerr << "ConnectionPool::create_self_hosting(): The data sub-directory could not be found." << dbdir_data_uri << std::endl;
+    std::cerr << G_STRFUNC << ": The data sub-directory could not be found." << dbdir_data_uri << std::endl;
     return false;
   }
 
 
   const int available_port = discover_first_free_port(PORT_POSTGRESQL_SELF_HOSTED_START, PORT_POSTGRESQL_SELF_HOSTED_END);
-  //std::cout << "ConnectionPool::create_self_hosting():() : debug: Available port for self-hosting: " << available_port << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ":() : debug: Available port for self-hosting: " << available_port << std::endl;
   if(available_port == 0)
   {
     //TODO: Use a return enum or exception so we can tell the user about this:
-    std::cerr << "ConnectionPool::create_self_hosting(): No port was available between " << PORT_POSTGRESQL_SELF_HOSTED_START << " and " << PORT_POSTGRESQL_SELF_HOSTED_END << std::endl;
+    std::cerr << G_STRFUNC << ": No port was available between " << PORT_POSTGRESQL_SELF_HOSTED_START << " and " << PORT_POSTGRESQL_SELF_HOSTED_END << std::endl;
     return false;
   }
 
@@ -631,7 +631,7 @@ Glib::RefPtr<Gnome::Gda::Connection> PostgresSelfHosted::connect(const Glib::ust
         }
       }
 
-      std::cout << "DEBUG: Glom::PostgresSelfHosted::connect(): Waiting and retrying the connection due to suspected too-early success of pg_ctl." << std::endl; 
+      std::cout << "debug: " << G_STRFUNC << ": Waiting and retrying the connection due to suspected too-early success of pg_ctl." << std::endl; 
 
       //Wait:
       Glib::RefPtr<Glib::MainLoop> mainloop = Glib::MainLoop::create(false);
@@ -704,7 +704,7 @@ int PostgresSelfHosted::discover_first_free_port(int start_port, int end_port)
     }
     else
     {
-      //std::cout << "debug: ConnectionPool::discover_first_free_port(): port in use: " << port_to_try << std::endl;
+      //std::cout << "debug: " << G_STRFUNC << ": port in use: " << port_to_try << std::endl;
     }
 
     if(available)
@@ -715,7 +715,7 @@ int PostgresSelfHosted::discover_first_free_port(int start_port, int end_port)
       close(fd);
       #endif //G_OS_WIN32
 
-      //std::cout << "debug: ConnectionPool::discover_first_free_port(): Found: returning " << port_to_try << std::endl;
+      //std::cout << "debug: " << G_STRFUNC << ": Found: returning " << port_to_try << std::endl;
       return port_to_try;
     }
 
@@ -728,7 +728,7 @@ int PostgresSelfHosted::discover_first_free_port(int start_port, int end_port)
   close(fd);
 #endif //G_OS_WIN32
 
-  std::cerr << "debug: ConnectionPool::discover_first_free_port(): No port was available." << std::endl;
+  std::cerr << G_STRFUNC << ": No port was available." << std::endl;
   return 0;
 }
 
@@ -757,7 +757,7 @@ bool PostgresSelfHosted::create_text_file(const std::string& file_uri, const std
   catch(const Gio::Error& ex)
   {
     // If the operation was not successful, print the error and abort
-    std::cerr << "ConnectionPool::create_text_file(): exception while creating file." << std::endl
+    std::cerr << G_STRFUNC << ": exception while creating file." << std::endl
       << "  file uri:" << file_uri << std::endl
       << "  error:" << ex.what() << std::endl;
     return false; // print_error(ex, output_uri_string);
@@ -778,7 +778,7 @@ bool PostgresSelfHosted::create_text_file(const std::string& file_uri, const std
   catch(const Gio::Error& ex)
   {
     // If the operation was not successful, print the error and abort
-    std::cerr << "ConnectionPool::create_text_file(): exception while writing to file." << std::endl
+    std::cerr << G_STRFUNC << ": exception while writing to file." << std::endl
       << "  file uri:" << file_uri << std::endl
       << "  error:" << ex.what() << std::endl;
     return false; //print_error(ex, output_uri_string);
@@ -786,7 +786,7 @@ bool PostgresSelfHosted::create_text_file(const std::string& file_uri, const std
 
   if(bytes_written != contents_size)
   {
-    std::cerr << "ConnectionPool::create_text_file(): not all bytes written when writing to file." << std::endl
+    std::cerr << G_STRFUNC << ": not all bytes written when writing to file." << std::endl
       << "  file uri:" << file_uri << std::endl;
     return false;
   }
diff --git a/glom/libglom/connectionpool_backends/sqlite.cc b/glom/libglom/connectionpool_backends/sqlite.cc
index f046b4d..7ee4f97 100644
--- a/glom/libglom/connectionpool_backends/sqlite.cc
+++ b/glom/libglom/connectionpool_backends/sqlite.cc
@@ -304,7 +304,7 @@ bool Sqlite::recreate_table(const Glib::RefPtr<Gnome::Gda::Connection>& connecti
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << "Sqlite::recreate_table(): Could not begin transaction: exception=" << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Could not begin transaction: exception=" << ex.what() << std::endl;
     return false;
   }
   
@@ -327,8 +327,8 @@ bool Sqlite::recreate_table(const Glib::RefPtr<Gnome::Gda::Connection>& connecti
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << "Sqlite::recreate_table(): exception=" << ex.what() << std::endl;
-    std::cerr << "Sqlite::recreate_table(): Reverting the transaction." << std::endl;
+    std::cerr << G_STRFUNC << ": exception=" << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Reverting the transaction." << std::endl;
     
     try
     {
@@ -336,7 +336,7 @@ bool Sqlite::recreate_table(const Glib::RefPtr<Gnome::Gda::Connection>& connecti
     }
     catch(const Glib::Error& ex)
     {
-       std::cerr << "Sqlite::recreate_table(): Could not revert the transaction. exception=" << ex.what() << std::endl;
+       std::cerr << G_STRFUNC << ": Could not revert the transaction. exception=" << ex.what() << std::endl;
     }
   }
 
diff --git a/glom/libglom/data_structure/field.cc b/glom/libglom/data_structure/field.cc
index 34dcb51..76e868f 100644
--- a/glom/libglom/data_structure/field.cc
+++ b/glom/libglom/data_structure/field.cc
@@ -229,7 +229,7 @@ Glib::ustring Field::sql(const Gnome::Gda::Value& value, const Glib::RefPtr<Gnom
   Glib::RefPtr<const Gnome::Gda::ServerProvider> provider = connection->get_provider();
   if(!provider)
   {
-    std::cerr << "Field::sql(): The ServerProvider was null." << std::endl;
+    std::cerr << G_STRFUNC << ": The ServerProvider was null." << std::endl;
     return Glib::ustring();
   } 
 
@@ -244,7 +244,7 @@ Glib::ustring Field::sql(const Gnome::Gda::Value& value, const Glib::RefPtr<Gnom
   }
   else
   {
-    std::cerr << "Field::sql(): The DataHandler was null." << std::endl;
+    std::cerr << G_STRFUNC << ": The DataHandler was null." << std::endl;
     return Glib::ustring();
   }
 
@@ -542,7 +542,7 @@ Glib::RefPtr<Gnome::Gda::Holder> Field::get_holder(const Gnome::Gda::Value& valu
     // investigate why the field type is not GdaBinary as well.
     // Maybe get_gda_type_for_glom_type() should already return fallback
     // types if necessary.
-    std::cout << "DEBUG: Field::get_holder(): Field type " << g_type_name(field_type) << " and value type " << g_type_name(gtype) << " don't match." << std::endl;
+    std::cout << "debug: " << G_STRFUNC << ": Field type " << g_type_name(field_type) << " and value type " << g_type_name(gtype) << " don't match." << std::endl;
   }
   */
 
@@ -607,7 +607,7 @@ GType Field::get_gda_type_for_glom_type(Field::glom_field_type glom_type)
     g_warning("Field::get_gda_type_for_glom_type(): Returning G_TYPE_NONE for glom_type=%d", glom_type);
   }
 
-  //std::cout << "Field::get_gda_type_for_glom_type(): returning: " << g_type_name(ideal_gda_type) << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": returning: " << g_type_name(ideal_gda_type) << std::endl;
   
   return ideal_gda_type;
 }
diff --git a/glom/libglom/data_structure/fieldtypes.cc b/glom/libglom/data_structure/fieldtypes.cc
index 9cc384a..b4c460d 100644
--- a/glom/libglom/data_structure/fieldtypes.cc
+++ b/glom/libglom/data_structure/fieldtypes.cc
@@ -48,17 +48,17 @@ FieldTypes::FieldTypes(const Glib::RefPtr<Gnome::Gda::Connection>& gda_connectio
       data_model_tables = gda_connection->get_meta_store_data(Gnome::Gda::CONNECTION_META_TYPES);
 
     if(!data_model_tables)
-      std::cerr << "FieldTypes::FieldTypes(): Couldn't get datamodel" << std::endl;
+      std::cerr << G_STRFUNC << ": Couldn't get datamodel" << std::endl;
 
     if(data_model_tables && (data_model_tables->get_n_columns() == 0))
     {
-      std::cerr << "FieldTypes::FieldTypes(): get_meta_store_data(Gnome::Gda::CONNECTION_META_TYPES) failed." << std::endl;
+      std::cerr << G_STRFUNC << ": get_meta_store_data(Gnome::Gda::CONNECTION_META_TYPES) failed." << std::endl;
     }
     else if(data_model_tables)
     {
       int rows = data_model_tables->get_n_rows();
       if(!rows)
-        std::cerr << "FieldTypes::FieldTypes(): no rows from CONNECTION_META_TYPES" << std::endl;
+        std::cerr << G_STRFUNC << ": no rows from CONNECTION_META_TYPES" << std::endl;
 
       for(int i = 0; i < rows; ++i)
       {
diff --git a/glom/libglom/data_structure/glomconversions.cc b/glom/libglom/data_structure/glomconversions.cc
index 834839c..3eb1fc1 100644
--- a/glom/libglom/data_structure/glomconversions.cc
+++ b/glom/libglom/data_structure/glomconversions.cc
@@ -214,7 +214,7 @@ Glib::ustring Conversions::format_tm(const tm& tm_data, const std::locale& local
   tp.put(the_stream /* iter to beginning of stream */, the_stream, ' ' /* fill */, &tm_data, format, format + strlen(format) /* 'E' */ /* use locale's alternative format */);
 
   Glib::ustring text = the_stream.str();
-  //std::cout << "DEBUG: format_tm(): result from tp.put: " << text << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": result from tp.put: " << text << std::endl;
 
   if(locale == std::locale("") /* The user's current locale */)
   {
@@ -223,7 +223,7 @@ Glib::ustring Conversions::format_tm(const tm& tm_data, const std::locale& local
     text = Glib::locale_to_utf8(text);
   }
 
-  //std::cout << "DEBUG: format_tm(): returning: " << text << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": returning: " << text << std::endl;
   return text; //TODO: Use something like Glib::locale_to_utf8()?
 
   /*
@@ -309,7 +309,7 @@ double Conversions::get_double_for_gda_value_numeric(const Gnome::Gda::Value& va
       case G_TYPE_UINT64:
         return value.get_uint64();
       default:
-        std::cerr << "Conversions::get_double_for_gda_value_numeric(): expected NUMERIC but GdaValue type is: " << g_type_name(value.get_value_type()) << std::endl;
+        std::cerr << G_STRFUNC << ": expected NUMERIC but GdaValue type is: " << g_type_name(value.get_value_type()) << std::endl;
         return 0;
     }
   }
@@ -349,7 +349,7 @@ Glib::ustring Conversions::get_text_for_gda_value(Field::glom_field_type glom_ty
       bool success;
       the_c_time = parse_date(value.get_string(), std::locale::classic(), success);
       if(!success)
-        std::cerr << "Conversions::get_text_for_gda_value(): Failed to convert string-represented date value" << std::endl;
+        std::cerr << G_STRFUNC << ": Failed to convert string-represented date value" << std::endl;
     }
     else if(value.get_value_type() == G_TYPE_DATE)
     {
@@ -364,7 +364,7 @@ Glib::ustring Conversions::get_text_for_gda_value(Field::glom_field_type glom_ty
     }
     else
     {
-      std::cerr << "Conversions::get_text_for_gda_value(): glom field type is DATE but GdaValue type is: " << g_type_name(value.get_value_type()) << std::endl;
+      std::cerr << G_STRFUNC << ": glom field type is DATE but GdaValue type is: " << g_type_name(value.get_value_type()) << std::endl;
 
       // Default
       the_c_time.tm_mday = 1;
@@ -390,7 +390,7 @@ Glib::ustring Conversions::get_text_for_gda_value(Field::glom_field_type glom_ty
       bool success;
       the_c_time = parse_time(value.get_string(), std::locale::classic(), success);
       if(!success)
-        std::cerr << "Conversions::get_text_for_gda_value(): Failed to convert string-represented time value" << std::endl;
+        std::cerr << G_STRFUNC << ": Failed to convert string-represented time value" << std::endl;
     }
     else if(value.get_value_type() == GDA_TYPE_TIME)
     {
@@ -404,7 +404,7 @@ Glib::ustring Conversions::get_text_for_gda_value(Field::glom_field_type glom_ty
     }
     else
     {
-      std::cerr << "Conversions::get_text_for_gda_value(): glom field type is TIME but GdaValue type is: " << g_type_name(value.get_value_type()) << std::endl;
+      std::cerr << G_STRFUNC << ": glom field type is TIME but GdaValue type is: " << g_type_name(value.get_value_type()) << std::endl;
     }
 
     return format_time(the_c_time, locale, iso_format);
@@ -413,7 +413,7 @@ Glib::ustring Conversions::get_text_for_gda_value(Field::glom_field_type glom_ty
   {
     if(value.get_value_type() != GDA_TYPE_NUMERIC && value.get_value_type() != G_TYPE_DOUBLE)
     {
-      std::cerr << "Conversions::get_text_for_gda_value(): glom field type is NUMERIC but GdaValue type is: " << g_type_name(value.get_value_type()) << std::endl;
+      std::cerr << G_STRFUNC << ": glom field type is NUMERIC but GdaValue type is: " << g_type_name(value.get_value_type()) << std::endl;
       return value.to_string();
     }
 
@@ -472,7 +472,7 @@ Glib::ustring Conversions::get_text_for_gda_value(Field::glom_field_type glom_ty
       text = Glib::locale_to_utf8(text);
     }
 
-    //std::cout << "DEBUG: Conversions::get_text_for_gda_value(): number=" << number << ", text=" << text << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": number=" << number << ", text=" << text << std::endl;
     return text; //Do something like Glib::locale_to_utf(), but with the specified locale instead of the current locale.
   }
   else if(glom_type == Field::TYPE_TEXT)
@@ -494,12 +494,12 @@ Glib::ustring Conversions::get_text_for_gda_value(Field::glom_field_type glom_ty
     //- UI-visible strings, but images should never be shown as text in the UI. 
     //- Values in SQL queries, but we only do that for clauses (where/sort/order) 
     //  which should never use image values.
-    std::cerr << "Conversions::get_text_for_gda_value(): Unexpected TYPE_IMAGE field type: " << glom_type << std::endl;
+    std::cerr << G_STRFUNC << ": Unexpected TYPE_IMAGE field type: " << glom_type << std::endl;
     return Glib::ustring();
   }
   else
   {
-    std::cerr << "Conversions::get_text_for_gda_value(): Unexpected glom field type: " << glom_type << std::endl;
+    std::cerr << G_STRFUNC << ": Unexpected glom field type: " << glom_type << std::endl;
     return value.to_string();
   }
 }
@@ -601,7 +601,7 @@ Gnome::Gda::Value Conversions::parse_value(Field::glom_field_type glom_type, con
     double the_number = 0;
     the_stream >> the_number;  //TODO: Does this throw any exception if the text is an invalid number?
 
-    //std::cout << "DEBUG: Conversions::parse_value(): text=" << text_to_parse << ", number=" << the_number << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": text=" << text_to_parse << ", number=" << the_number << std::endl;
     
 
     GdaNumeric gda_numeric = {0, 0, 0, 0};
@@ -637,7 +637,7 @@ Gnome::Gda::Value Conversions::parse_value(Field::glom_field_type glom_type, con
   {
     //This function is only used for :
     //- UI-visible strings, but images should never be entered as text in the UI. 
-    std::cerr << "Conversions::parse_value(): Unexpected TYPE_IMAGE field type: " << glom_type << std::endl;
+    std::cerr << G_STRFUNC << ": Unexpected TYPE_IMAGE field type: " << glom_type << std::endl;
     return Gnome::Gda::Value();
   }
 
@@ -783,7 +783,7 @@ tm Conversions::parse_time(const Glib::ustring& text, bool& success)
 
 tm Conversions::parse_time(const Glib::ustring& text, const std::locale& locale, bool& success)
 {
-  //std::cout << "parse_time(): text=" << text << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": text=" << text << std::endl;
   //The sequence of statements here seems to be very fragile. If you move things then it stops working.
 
   //return parse_tm(text, locale, 'X' /* time */);
@@ -846,7 +846,7 @@ tm Conversions::parse_time(const Glib::ustring& text, const std::locale& locale,
   lastchar = strptime(text.c_str(), "%X" /* The time, using the locale's time format. */, &the_c_time);
   if(lastchar)
   {
-    //std::cout << "DEBUG: parse_time(): %X: text=" << text << " was parsed as: hour=" << the_c_time.tm_hour << ", min=" << the_c_time.tm_min  << ", sec=" << the_c_time.tm_sec << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": %X: text=" << text << " was parsed as: hour=" << the_c_time.tm_hour << ", min=" << the_c_time.tm_min  << ", sec=" << the_c_time.tm_sec << std::endl;
     success = true;
     return the_c_time;
   }
@@ -857,7 +857,7 @@ tm Conversions::parse_time(const Glib::ustring& text, const std::locale& locale,
   lastchar = strptime(text.c_str(), "%c" /* alternative 12-hour clock */, &the_c_time);
   if(lastchar)
   {
-    //std::cout << "DEBUG: parse_time(): %c: text=" << text << " was parsed as: hour=" << the_c_time.tm_hour << ", min=" << the_c_time.tm_min  << ", sec=" << the_c_time.tm_sec << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": %c: text=" << text << " was parsed as: hour=" << the_c_time.tm_hour << ", min=" << the_c_time.tm_min  << ", sec=" << the_c_time.tm_sec << std::endl;
     success = true;
     return the_c_time;
   }
@@ -867,7 +867,7 @@ tm Conversions::parse_time(const Glib::ustring& text, const std::locale& locale,
   lastchar = strptime(text.c_str(), "%I : %M %p" /* 12 hours clock with AM/PM, without seconds. */, &the_c_time);
   if(lastchar)
   {
-    //std::cout << "DEBUG: parse_time(): %I : %M %p: text=" << text << " was parsed as: hour=" << the_c_time.tm_hour << ", min=" << the_c_time.tm_min  << ", sec=" << the_c_time.tm_sec << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": %I : %M %p: text=" << text << " was parsed as: hour=" << the_c_time.tm_hour << ", min=" << the_c_time.tm_min  << ", sec=" << the_c_time.tm_sec << std::endl;
     success = true;
     return the_c_time;
   }
diff --git a/glom/libglom/data_structure/layout/layoutitem_field.cc b/glom/libglom/data_structure/layout/layoutitem_field.cc
index 7066b41..48c33db 100644
--- a/glom/libglom/data_structure/layout/layoutitem_field.cc
+++ b/glom/libglom/data_structure/layout/layoutitem_field.cc
@@ -243,8 +243,8 @@ void LayoutItem_Field::set_full_field_details(const sharedptr<const Field>& fiel
 
   if(field)
   {
-    //std::cout << "LayoutItem_Field::set_full_field_details(): name=" << field->get_name() << std::endl;
-    //std::cout << "LayoutItem_Field::set_full_field_details(): field->get_title_or_name()=" << field->get_title_or_name() << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": name=" << field->get_name() << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": field->get_title_or_name()=" << field->get_title_or_name() << std::endl;
     m_field = field;
     m_field_cache_valid = true;
 
diff --git a/glom/libglom/data_structure/layout/usesrelationship.cc b/glom/libglom/data_structure/layout/usesrelationship.cc
index 45470bb..ed408b0 100644
--- a/glom/libglom/data_structure/layout/usesrelationship.cc
+++ b/glom/libglom/data_structure/layout/usesrelationship.cc
@@ -125,7 +125,7 @@ Glib::ustring UsesRelationship::get_sql_table_or_join_alias_name(const Glib::ust
 
 Glib::ustring UsesRelationship::get_table_used(const Glib::ustring& parent_table) const
 {
-  //std::cout << "UsesRelationship::get_table_used(): relationship=" << glom_get_sharedptr_name(m_relationship) << "related_relationship=" << glom_get_sharedptr_name(m_related_relationship) << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": relationship=" << glom_get_sharedptr_name(m_relationship) << "related_relationship=" << glom_get_sharedptr_name(m_related_relationship) << std::endl;
 
   if(m_related_relationship)
     return m_related_relationship->get_to_table();
diff --git a/glom/libglom/data_structure/translatable_item.cc b/glom/libglom/data_structure/translatable_item.cc
index 2f8d133..86238fa 100644
--- a/glom/libglom/data_structure/translatable_item.cc
+++ b/glom/libglom/data_structure/translatable_item.cc
@@ -207,7 +207,7 @@ Glib::ustring TranslatableItem::get_current_locale()
     const char* cLocale = setlocale(LC_ALL, 0); //Passing NULL means query, instead of set.
     if(cLocale)
     {
-      //std::cout << "TranslatableItem::get_current_locale(): locale=" << cLocale << std::endl;
+      //std::cout << "debug: " << G_STRFUNC << ": locale=" << cLocale << std::endl;
       m_current_locale = Utils::locale_simplify(cLocale);
     }
     else
diff --git a/glom/libglom/db_utils.cc b/glom/libglom/db_utils.cc
index af904f7..ea02f08 100644
--- a/glom/libglom/db_utils.cc
+++ b/glom/libglom/db_utils.cc
@@ -44,12 +44,12 @@ static Glib::RefPtr<Gnome::Gda::Connection> get_connection()
   }
   catch (const Glib::Error& error)
   {
-    std::cerr << "get_connection(): " << error.what() << std::endl;
+    std::cerr << G_STRFUNC << ": " << error.what() << std::endl;
   }
 
   if(!sharedconnection)
   {
-    std::cerr << "get_connection(): No connection yet." << std::endl;
+    std::cerr << G_STRFUNC << ": No connection yet." << std::endl;
     return Glib::RefPtr<Gnome::Gda::Connection>(0);
   }
 
@@ -68,22 +68,22 @@ static void update_gda_metastore_for_table(const Glib::ustring& table_name)
   Glib::RefPtr<Gnome::Gda::Connection> gda_connection = get_connection();
   if(!gda_connection)
   {
-    std::cerr << "update_gda_metastore_for_table(): No gda_connection." << std::endl;
+    std::cerr << G_STRFUNC << ": No gda_connection." << std::endl;
     return;
   }
 
   if(table_name.empty())
   {
-    std::cerr << "update_gda_metastore_for_table(): table_name is empty." << std::endl;
+    std::cerr << G_STRFUNC << ": table_name is empty." << std::endl;
     return;
   }
 
-  //std::cout << "DEBUG: update_gda_metastore_for_table(): Calling Gda::Connection::update_meta_store_table(" << table_name << ") ..." << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": Calling Gda::Connection::update_meta_store_table(" << table_name << ") ..." << std::endl;
   //TODO: This doesn't seem to quite work yet:
   gda_connection->update_meta_store_table(table_name);
 
   //This does work, though it takes ages: gda_connection->update_meta_store();
-  //std::cout << "DEBUG: update_gda_metastore_for_table(): ... Finished calling Gda::Connection::update_meta_store_table()" << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": ... Finished calling Gda::Connection::update_meta_store_table()" << std::endl;
 }
 
 bool create_database(Document* document, const Glib::ustring& database_name, const Glib::ustring& title, const sigc::slot<void>& progress)
@@ -104,7 +104,7 @@ bool create_database(Document* document, const Glib::ustring& database_name, con
   }
   catch(const Glib::Exception& ex) // libgda does not set error domain
   {
-    std::cerr << "create_database():  Gnome::Gda::Connection::create_database(" << database_name << ") failed: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ":  Gnome::Gda::Connection::create_database(" << database_name << ") failed: " << ex.what() << std::endl;
 
     return false;
   }
@@ -124,12 +124,12 @@ bool create_database(Document* document, const Glib::ustring& database_name, con
   }
   catch(const Glib::Exception& ex)
   {
-    std::cerr << "create_database(): Could not connect to just-created database. exception caught:" << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Could not connect to just-created database. exception caught:" << ex.what() << std::endl;
     return false;
   }
   catch(const std::exception& ex)
   {
-    std::cerr << "create_database(): Could not connect to just-created database. exception caught:" << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Could not connect to just-created database. exception caught:" << ex.what() << std::endl;
     return false;
   }
 
@@ -151,19 +151,19 @@ bool create_database(Document* document, const Glib::ustring& database_name, con
 
     progress();
 
-    //std::cout << "create_database(): Creation of standard tables and groups finished." << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": Creation of standard tables and groups finished." << std::endl;
 
     //Set the title based on the title in the example document, or the user-supplied title when creating new documents:
     SystemPrefs prefs = get_database_preferences(document);
     if(prefs.m_name.empty())
     {
-      //std::cout << "create_database(): Setting title in the database." << std::endl;
+      //std::cout << "debug: " << G_STRFUNC << ": Setting title in the database." << std::endl;
       prefs.m_name = title;
       set_database_preferences(document, prefs);
     }
     else
     {
-      //std::cout << "create_database(): database has title: " << prefs.m_name << std::endl;
+      //std::cout << "debug: " << G_STRFUNC << ": database has title: " << prefs.m_name << std::endl;
     }
 
     progress();
@@ -172,7 +172,7 @@ bool create_database(Document* document, const Glib::ustring& database_name, con
   }
   else
   {
-    std::cerr << "create_database(): Could not connect to just-created database." << std::endl;
+    std::cerr << G_STRFUNC << ": Could not connect to just-created database." << std::endl;
     return false;
   }
 }
@@ -286,7 +286,7 @@ bool recreate_database_from_document(Document* document, const sigc::slot<void>&
     //}
     //catch(const std::exception& ex)
     //{
-    //  std::cerr << "Application::recreate_database(): exception: " << ex.what() << std::endl;
+    //  std::cerr << G_STRFUNC << ": exception: " << ex.what() << std::endl;
       //HandleError(ex);
     //}
 
@@ -357,12 +357,12 @@ SystemPrefs get_database_preferences(Document* document)
     }
     catch(const Glib::Exception& ex)
     {
-      std::cerr << "get_database_preferences(): exception: " << ex.what() << std::endl;
+      std::cerr << G_STRFUNC << ": exception: " << ex.what() << std::endl;
       succeeded = false;
     }
     catch(const std::exception& ex)
     {
-      std::cerr << "get_database_preferences(): exception: " << ex.what() << std::endl;
+      std::cerr << G_STRFUNC << ": exception: " << ex.what() << std::endl;
       succeeded = false;
     }
     //Return the result, or try again:
@@ -403,7 +403,7 @@ void set_database_preferences(Document* document, const SystemPrefs& prefs)
   const bool test = query_execute(builder);
 
   if(!test)
-    std::cerr << "set_database_preferences(): UPDATE failed." << std::endl;
+    std::cerr << G_STRFUNC << ": UPDATE failed." << std::endl;
 
   //Set some information in the document too, so we can use it to recreate the database:
   document->set_database_title(prefs.m_name);
@@ -430,7 +430,7 @@ bool add_standard_tables(Document* document)
         builder->add_field_value(GLOM_STANDARD_TABLE_PREFS_FIELD_ID, 1);
         const bool test = query_execute(builder);
         if(!test)
-          std::cerr << "add_standard_tables(): INSERT failed." << std::endl;
+          std::cerr << G_STRFUNC << ": INSERT failed." << std::endl;
 
         //Use the database title from the document, if there is one:
         const Glib::ustring system_name = document->get_database_title();
@@ -444,7 +444,7 @@ bool add_standard_tables(Document* document)
                                                builder->add_expr(1)));
           const bool test = query_execute(builder);
           if(!test)
-            std::cerr << "add_standard_tables(): UPDATE failed." << std::endl;
+            std::cerr << G_STRFUNC << ": UPDATE failed." << std::endl;
         }
       }
       else
@@ -506,12 +506,12 @@ bool add_standard_tables(Document* document)
   }
   catch(const Glib::Exception& ex)
   {
-    std::cerr << "add_standard_tables(): caught exception: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": caught exception: " << ex.what() << std::endl;
     return false;
   }
   catch(const std::exception& ex)
   {
-    std::cerr << "add_standard_tables(): caught exception: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": caught exception: " << ex.what() << std::endl;
     return false;
   }
 }
@@ -524,7 +524,7 @@ bool add_standard_groups(Document* document)
   Glib::RefPtr<Gnome::Gda::Connection> gda_connection = get_connection();
   if(!gda_connection)
   {
-    std::cerr << "add_standard_groups(): No connection yet." << std::endl;
+    std::cerr << G_STRFUNC << ": No connection yet." << std::endl;
   }
 
   // If the connection doesn't support users we can skip this step
@@ -539,7 +539,7 @@ bool add_standard_groups(Document* document)
       bool test = query_execute_string("CREATE GROUP \"" GLOM_STANDARD_GROUP_NAME_DEVELOPER "\" WITH SUPERUSER");
       if(!test)
       {
-        std::cerr << "Glom add_standard_groups(): CREATE GROUP failed when adding the developer group." << std::endl;
+        std::cerr << G_STRFUNC << ": CREATE GROUP failed when adding the developer group." << std::endl;
         return false;
       }
 
@@ -550,7 +550,7 @@ bool add_standard_groups(Document* document)
       test = query_execute_string(strQuery);
       if(!test)
       {
-        std::cerr << "Glom add_standard_groups(): ALTER GROUP failed when adding the user to the developer group." << std::endl;
+        std::cerr << G_STRFUNC << ": ALTER GROUP failed when adding the user to the developer group." << std::endl;
         return false;
       }
 
@@ -695,7 +695,7 @@ type_vec_fields get_fields_for_table_from_database(const Glib::ustring& table_na
     Glib::RefPtr<Gnome::Gda::Connection> connection = get_connection();
     if(!connection)
     {
-      std::cerr << "get_fields_for_table_from_database(): connection is null" << std::endl;
+      std::cerr << G_STRFUNC << ": connection is null" << std::endl;
       return result;
     }
 
@@ -718,21 +718,21 @@ type_vec_fields get_fields_for_table_from_database(const Glib::ustring& table_na
     }
     catch(const Gnome::Gda::MetaStoreError& ex)
     {
-      std::cerr << "get_fields_for_table_from_database(): MetaStoreError: " << ex.what() << std::endl;
+      std::cerr << G_STRFUNC << ": MetaStoreError: " << ex.what() << std::endl;
     }
     catch(const Glib::Error& ex)
     {
-      std::cerr << "get_fields_for_table_from_database(): Error: " << ex.what() << std::endl;
+      std::cerr << G_STRFUNC << ": Error: " << ex.what() << std::endl;
     }
 
 
     if(!data_model_fields)
     {
-      std::cerr << "get_fields_for_table_from_database(): libgda reported empty fields schema data_model for the table." << std::endl;
+      std::cerr << G_STRFUNC << ": libgda reported empty fields schema data_model for the table." << std::endl;
     }
     else if(data_model_fields->get_n_columns() == 0)
     {
-      std::cerr << "get_fields_for_table_from_database(): libgda reported 0 fields for the table." << std::endl;
+      std::cerr << G_STRFUNC << ": libgda reported 0 fields for the table." << std::endl;
     }
     else if(data_model_fields->get_n_rows() == 0)
     {
@@ -847,16 +847,16 @@ type_vec_strings get_table_names_from_database(bool ignore_system_tables)
     }
     catch(const Gnome::Gda::MetaStoreError& ex)
     {
-      std::cerr << "get_table_names_from_database(): MetaStoreError: " << ex.what() << std::endl;
+      std::cerr << G_STRFUNC << ": MetaStoreError: " << ex.what() << std::endl;
     }
     catch(const Glib::Error& ex)
     {
-      std::cerr << "get_table_names_from_database(): Error: " << ex.what() << std::endl;
+      std::cerr << G_STRFUNC << ": Error: " << ex.what() << std::endl;
     }
 
     if(data_model_tables && (data_model_tables->get_n_columns() == 0))
     {
-      std::cerr << "get_table_names_from_database(): libgda reported 0 tables for the database." << std::endl;
+      std::cerr << G_STRFUNC << ": libgda reported 0 tables for the database." << std::endl;
     }
     else if(data_model_tables)
     {
@@ -928,7 +928,7 @@ bool create_table_with_default_fields(Document* document, const Glib::ustring& t
   Glib::RefPtr<Gnome::Gda::Connection> gda_connection = get_connection();
   if(!gda_connection)
   {
-    std::cerr << "create_table_with_default_fields(): No connection yet." << std::endl;
+    std::cerr << G_STRFUNC << ": No connection yet." << std::endl;
     return false;
   }
 
@@ -946,7 +946,7 @@ bool create_table_with_default_fields(Document* document, const Glib::ustring& t
   field_primary_key->set_field_info(field_info);
 
   field_primary_key->set_glom_type(Field::TYPE_NUMERIC);
-  //std::cout << "field_primary_key->get_auto_increment():" << field_primary_key->get_auto_increment() << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ":" << field_primary_key->get_auto_increment() << std::endl;
 
   type_vec_fields fields;
   fields.push_back(field_primary_key);
@@ -1000,7 +1000,7 @@ bool create_table_with_default_fields(Document* document, const Glib::ustring& t
 }
 bool create_table(const sharedptr<const TableInfo>& table_info, const Document::type_vec_fields& fields_in)
 {
-  //std::cout << "create_table(): " << table_info->get_name() << ", title=" << table_info->get_title() << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": " << table_info->get_name() << ", title=" << table_info->get_title() << std::endl;
 
   bool table_creation_succeeded = false;
 
@@ -1054,7 +1054,7 @@ bool create_table(const sharedptr<const TableInfo>& table_info, const Document::
     //TODO: Use GDA_SERVER_OPERATION_CREATE_TABLE instead?
     table_creation_succeeded = query_execute_string( "CREATE TABLE \"" + table_info->get_name() + "\" (" + sql_fields + ");" );
     if(!table_creation_succeeded)
-      std::cerr << "create_table(): CREATE TABLE failed." << std::endl;
+      std::cerr << G_STRFUNC << ": CREATE TABLE failed." << std::endl;
   }
   catch(const ExceptionConnection& ex)
   {
@@ -1155,7 +1155,7 @@ Gnome::Gda::Value get_next_auto_increment_value(const Glib::ustring& table_name,
                                                          builder->add_expr(field_name))));
   const bool test = query_execute(builder);
   if(!test)
-    std::cerr << "get_next_auto_increment_value(): Increment failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Increment failed." << std::endl;
 
   return result;
 }
@@ -1169,7 +1169,7 @@ Gnome::Gda::Value auto_increment_insert_first_if_necessary(const Glib::ustring&
   if(!table_privs.m_view || !table_privs.m_edit)
   {
     //This should not happen:
-    std::cerr << "Glom: auto_increment_insert_first_if_necessary(): The current user may not edit the autoincrements table. Any user who has create rights for a table should have edit rights to the autoincrements table." << std::endl;
+    std::cerr << G_STRFUNC << ": The current user may not edit the autoincrements table. Any user who has create rights for a table should have edit rights to the autoincrements table." << std::endl;
   }
 
   Glib::RefPtr<Gnome::Gda::SqlBuilder> builder =
@@ -1199,7 +1199,7 @@ Gnome::Gda::Value auto_increment_insert_first_if_necessary(const Glib::ustring&
 
     const bool test = query_execute(builder);
     if(!test)
-      std::cerr << "auto_increment_insert_first_if_necessary(): INSERT of new row failed." << std::endl;
+      std::cerr << G_STRFUNC << ": INSERT of new row failed." << std::endl;
 
     //GdaNumeric is a pain, so we take a short-cut:
     bool success = false;
@@ -1261,10 +1261,10 @@ static void recalculate_next_auto_increment_value(const Glib::ustring& table_nam
 
     const bool test = query_execute(builder);
     if(!test)
-      std::cerr << "recalculate_next_auto_increment_value(): UPDATE failed." << std::endl;
+      std::cerr << G_STRFUNC << ": UPDATE failed." << std::endl;
   }
   else
-    std::cerr << "recalculate_next_auto_increment_value(): SELECT MAX() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": SELECT MAX() failed." << std::endl;
 }
 
 bool insert_example_data(Document* document, const Glib::ustring& table_name)
@@ -1273,14 +1273,14 @@ bool insert_example_data(Document* document, const Glib::ustring& table_name)
   const Document::type_example_rows example_rows = document->get_table_example_data(table_name);
   if(example_rows.empty())
   {
-    //std::cout << "debug: insert_example_data(): No example data available." << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": No example data available." << std::endl;
     return true;
   }
 
   Glib::RefPtr<Gnome::Gda::Connection> gda_connection = get_connection();
   if(!gda_connection)
   {
-    std::cerr << "insert_example_data(): connection is null" << std::endl;
+    std::cerr << G_STRFUNC << ": connection is null" << std::endl;
     return false;
   }
 
@@ -1293,7 +1293,7 @@ bool insert_example_data(Document* document, const Glib::ustring& table_name)
   Document::type_vec_fields vec_fields = document->get_table_fields(table_name);
 
   //Actually insert the data:
-  //std::cout << "  debug: insert_example_data(): number of rows of data: " << vec_rows.size() << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": number of rows of data: " << vec_rows.size() << std::endl;
 
   //std::cout << "DEBUG: example_row size = " << example_rows.size() << std::endl;
 
@@ -1317,7 +1317,7 @@ bool insert_example_data(Document* document, const Glib::ustring& table_name)
       sharedptr<Field> field = vec_fields[i];
       if(!field)
       {
-        std::cerr << "insert_example_data(): field was null for field num=" << i << std::endl;
+        std::cerr << G_STRFUNC << ": field was null for field num=" << i << std::endl;
         break;
       }
 
@@ -1352,7 +1352,7 @@ Glib::RefPtr<Gnome::Gda::DataModel> query_execute_select(const Glib::RefPtr<cons
   Glib::RefPtr<Gnome::Gda::Connection> gda_connection = get_connection();
   if(!gda_connection)
   {
-    std::cerr << "query_execute_select(): No connection yet." << std::endl;
+    std::cerr << G_STRFUNC << ": No connection yet." << std::endl;
     return result;
   }
 
@@ -1360,7 +1360,7 @@ Glib::RefPtr<Gnome::Gda::DataModel> query_execute_select(const Glib::RefPtr<cons
   if(builder && ConnectionPool::get_instance()->get_show_debug_output())
   {
     const std::string full_query = Utils::sqlbuilder_get_full_query(builder);
-    std::cout << "Debug: query_execute_select():  " << full_query << std::endl;
+    std::cout << "debug: " << G_STRFUNC << ":  " << full_query << std::endl;
   }
 
   //TODO: Use DbUtils::query_execute().
@@ -1376,19 +1376,19 @@ Glib::RefPtr<Gnome::Gda::DataModel> query_execute_select(const Glib::RefPtr<cons
   }
   catch(const Gnome::Gda::ConnectionError& ex)
   {
-    std::cerr << "debug: query_execute_select(): ConnectionError: exception from statement_execute_select_builder(): " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
   }
   catch(const Gnome::Gda::ServerProviderError& ex)
   {
-    std::cerr << "debug: query_execute_select(): ServerProviderError: exception from statement_execute_select_builder(): code=" << ex.code() << "message=" << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": code=" << ex.code() << "message=" << ex.what() << std::endl;
   }
   catch(const Gnome::Gda::SqlError& ex) //TODO: Make sure that statement_execute_select_builder() is documented as throwing this.
   {
-    std::cerr << "debug: query_execute_select(): SqlError: exception from statement_execute_select_builder(): " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << "debug: query_execute_select(): Error (" << typeid(ex).name() << "): exception from statement_execute_select_builder(): " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
   }
 
 
@@ -1408,7 +1408,7 @@ bool query_execute_string(const Glib::ustring& strQuery, const Glib::RefPtr<Gnom
   Glib::RefPtr<Gnome::Gda::Connection> gda_connection = get_connection();
   if(!gda_connection)
   {
-    std::cerr << "query_execute(): No connection yet." << std::endl;
+    std::cerr << G_STRFUNC << ": No connection yet." << std::endl;
     return false;
   }
 
@@ -1433,7 +1433,7 @@ bool query_execute_string(const Glib::ustring& strQuery, const Glib::RefPtr<Gnom
       //TODO: full_query still seems to contain ## parameter names,
       //though it works for our SELECT queries in query_execute_select():
       const Glib::ustring full_query = stmt->to_sql(params);
-      std::cerr << "Debug: query_execute(): " << full_query << std::endl;
+      std::cerr << G_STRFUNC << ": " << full_query << std::endl;
     }
     catch(const Glib::Exception& ex)
     {
@@ -1462,7 +1462,7 @@ bool query_execute(const Glib::RefPtr<const Gnome::Gda::SqlBuilder>& builder)
   Glib::RefPtr<Gnome::Gda::Connection> gda_connection = get_connection();
   if(!gda_connection)
   {
-    std::cerr << "query_execute(): No connection yet." << std::endl;
+    std::cerr << G_STRFUNC << ": No connection yet." << std::endl;
     return false;
   }
 
@@ -1470,7 +1470,7 @@ bool query_execute(const Glib::RefPtr<const Gnome::Gda::SqlBuilder>& builder)
   if(builder && ConnectionPool::get_instance()->get_show_debug_output())
   {
     const std::string full_query = Utils::sqlbuilder_get_full_query(builder);
-    std::cerr << "Debug: query_execute(): " << full_query << std::endl;
+    std::cerr << G_STRFUNC << ": " << full_query << std::endl;
   }
 
 
@@ -1481,28 +1481,28 @@ bool query_execute(const Glib::RefPtr<const Gnome::Gda::SqlBuilder>& builder)
   }
   catch(const Gnome::Gda::ConnectionError& ex)
   {
-    std::cerr << "debug: query_execute_select(): ConnectionError: exception from statement_execute_non_select_builder(): " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
     const std::string full_query = Utils::sqlbuilder_get_full_query(builder);
     std::cerr << "  full_query: " << full_query << std::endl;
     return false;
   }
   catch(const Gnome::Gda::ServerProviderError& ex)
   {
-    std::cerr << "debug: query_execute_select(): ServerProviderError: exception from statement_execute_non_select_builder(): code=" << ex.code() << "message=" << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": code=" << ex.code() << "message=" << ex.what() << std::endl;
     const std::string full_query = Utils::sqlbuilder_get_full_query(builder);
     std::cerr << "  full_query: " << full_query << std::endl;
     return false;
   }
   catch(const Gnome::Gda::SqlError& ex) //TODO: Make sure that statement_execute_non_select_builder() is documented as throwing this.
   {
-    std::cerr << "debug: query_execute_select(): SqlError: exception from statement_execute_non_select_builder(): " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
     const std::string full_query = Utils::sqlbuilder_get_full_query(builder);
     std::cerr << "  full_query: " << full_query << std::endl;
     return false;
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << "debug: query_execute_select(): Error (" << typeid(ex).name() << "): exception from statement_execute_non_select_builder(): " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
     return false;
   }
   return (exec_retval >= 0);
diff --git a/glom/libglom/document/bakery/document.cc b/glom/libglom/document/bakery/document.cc
index 77118ef..37bd3e3 100644
--- a/glom/libglom/document/bakery/document.cc
+++ b/glom/libglom/document/bakery/document.cc
@@ -216,7 +216,7 @@ bool Document::read_from_disk(int& failure_code)
   }
   catch(const Gio::Error& ex)
   {
-    std::cout << "Debug: Document::read_from_disk(): Error: " << ex.what() << std::endl;
+    std::cout << "debug: " << G_STRFUNC << ": Error: " << ex.what() << std::endl;
 
     if(ex.code() == Gio::Error::NOT_FOUND)
       failure_code = LOAD_FAILURE_CODE_NOT_FOUND;
@@ -280,7 +280,7 @@ bool Document::write_to_disk()
       }
       catch(const Gio::Error& ex)
       {
-        std::cerr << "Bakery::Document::write_to_disk(): Error from Gio::File::replace(): " << ex.what() << std::endl;
+        std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
         return false;
       }
     }
@@ -298,7 +298,7 @@ bool Document::write_to_disk()
         //Otherwise something unexpected happened.
         if(ex.code() != Gio::Error::EXISTS)
         {
-          std::cerr << "Bakery::Document::write_to_disk(): Error from Gio::File::make_directory_with_parents(): parent of uri=" << m_file_uri << "error=" << ex.what() << std::endl;
+          std::cerr << G_STRFUNC << ": parent of uri=" << m_file_uri << "error=" << ex.what() << std::endl;
           return false;
         }
       }
@@ -313,7 +313,7 @@ bool Document::write_to_disk()
       }
       catch(const Gio::Error& ex)
       {
-        std::cerr << "Bakery::Document::write_to_disk(): Error from Gio::File::create_file():" << m_file_uri << "error=" << ex.what() << std::endl;
+        std::cerr << G_STRFUNC << ":" << m_file_uri << "error=" << ex.what() << std::endl;
         return false;
       }
     }
@@ -335,7 +335,7 @@ bool Document::write_to_disk()
     catch(const Gio::Error& ex)
     {
       // If the operation was not successful, print the error and abort
-      std::cerr << "Bakery::Document::write_to_disk(): Error from Gio stream.write(): " << ex.what() << std::endl;
+      std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
       return false; //print_error(ex, output_uri_string);
     }
 
diff --git a/glom/libglom/document/bakery/document_xml.cc b/glom/libglom/document/bakery/document_xml.cc
index 558ff07..7a98a5a 100644
--- a/glom/libglom/document/bakery/document_xml.cc
+++ b/glom/libglom/document/bakery/document_xml.cc
@@ -137,7 +137,7 @@ void Document_XML::Util_DOM_Write(Glib::ustring& refstrXML) const
 #ifdef LIBXMLCPP_EXCEPTIONS_ENABLED
   catch(xmlpp::exception& ex)
   {
-    std::cerr << "Document_XML::Util_DOM_Write(): exception caught: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": exception caught: " << ex.what() << std::endl;
   }
 #endif
 }
diff --git a/glom/libglom/document/document.cc b/glom/libglom/document/document.cc
index 3ba6922..26bba25 100644
--- a/glom/libglom/document/document.cc
+++ b/glom/libglom/document/document.cc
@@ -1273,7 +1273,7 @@ Document::type_listTableInfo Document::get_tables(bool plus_system_prefs) const
   for(type_tables::const_iterator iter = m_tables.begin(); iter != m_tables.end(); ++iter)
   {
     result.push_back(iter->second.m_info);
-    //std::cout << "Document::get_tables(): title=" << iter->second.m_info->get_title() << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": title=" << iter->second.m_info->get_title() << std::endl;
   }
 
   //Add the system properties if necessary:
@@ -1491,7 +1491,7 @@ Document::type_list_layout_groups Document::get_data_layout_groups_default(const
         //layout_item.set_table_name(child_table_name); //TODO: Allow viewing of fields through relationships.
         //layout_item.m_sequence = sequence;  add_item() will fill this.
 
-        //std::cout << "  debug: add_item(): " << layout_item.get_name() << std::endl;
+        //std::cout << "debug: " << G_STRFUNC << ": " << layout_item.get_name() << std::endl;
         if(pOverview && layout_item->get_full_field_details()->get_primary_key())
           pOverview->add_item(layout_item);
         else if(pDetails)
@@ -1523,7 +1523,7 @@ Document::type_list_layout_groups Document::get_data_layout_groups_plus_new_fiel
 
   if(create_default)
   {
-    std::cout << "DEBUG: Document::get_data_layout_groups_plus_new_fields(): Creating a default layout." << std::endl;
+    std::cout << "debug: " << G_STRFUNC << ": Creating a default layout." << std::endl;
     result = get_data_layout_groups_default(layout_name, parent_table_name, layout_platform);
     
     //Make the default layout suitable for the special platform:
@@ -1558,7 +1558,7 @@ Document::type_list_layout_groups Document::get_data_layout_groups_plus_new_fiel
 
 Document::type_list_layout_groups Document::get_data_layout_groups(const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform) const
 {
-  //std::cout << "DEBUG: Document::get_data_layout_groups(): layout_name=" << layout_name << ", parent_table_name=" << parent_table_name << ", layout_platform=" << layout_platform << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": layout_name=" << layout_name << ", parent_table_name=" << parent_table_name << ", layout_platform=" << layout_platform << std::endl;
 
   type_tables::const_iterator iterFind = m_tables.find(parent_table_name);
   if(iterFind != m_tables.end())
@@ -1592,7 +1592,7 @@ bool Document::get_data_layout_groups_have_any_fields(const Glib::ustring& layou
 
 void Document::set_data_layout_groups(const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform, const type_list_layout_groups& groups)
 {
-  //std::cout << "DEBUG: Document::set_data_layout_groups(): layout_name=" << layout_name << ", parent_table_name=" << parent_table_name << ", layout_platform=" << layout_platform << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": layout_name=" << layout_name << ", parent_table_name=" << parent_table_name << ", layout_platform=" << layout_platform << std::endl;
   const Glib::ustring child_table_name = parent_table_name; //TODO: Remove this cruft.
 
   //g_warning("Document::set_data_layout_groups(): ADDING layout for table %s (child_table=%s), for layout %s", parent_table_name.c_str(), child_table_name.c_str(), layout_name.c_str());
@@ -1652,7 +1652,7 @@ Glib::ustring Document::get_table_title_singular(const Glib::ustring& table_name
 
 void Document::set_table_title(const Glib::ustring& table_name, const Glib::ustring& value)
 {
-  //std::cout << "debug: Document::set_table_title(): table_name=" << table_name << ", value=" << value << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": table_name=" << table_name << ", value=" << value << std::endl;
   if(!table_name.empty())
   {
     DocumentTableInfo& info = get_table_info_with_add(table_name);
@@ -1747,7 +1747,7 @@ bool Document::set_userlevel(AppState::userlevels userlevel)
   //Prevent incorrect user level:
   if((userlevel == AppState::USERLEVEL_DEVELOPER) && get_read_only())
   {
-    std::cout << "DEBUG: Document::set_userlevel(): Developer mode denied because get_read_only() returned true." << std::endl;
+    std::cout << "debug: " << G_STRFUNC << ": Developer mode denied because get_read_only() returned true." << std::endl;
     std::cout << "  DEBUG: get_read_only()=" << get_read_only() << std::endl;
     std::cout << "  DEBUG: get_file_uri()=" << get_file_uri() << std::endl;
 
@@ -1834,7 +1834,7 @@ void Document::save_changes()
     bool test = save_before();
     if(test)
     {
-      //std::cout << "Document::save_changes(): calling write_to_disk()." << std::endl;
+      //std::cout << "debug: " << G_STRFUNC << ": calling write_to_disk()." << std::endl;
       test = write_to_disk();
       if(test)
       {
@@ -1844,7 +1844,7 @@ void Document::save_changes()
   }
   else
   {
-    //std::cout << "Document::save_changes(): Not saving, because not AppState::USERLEVEL_DEVELOPER" << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": Not saving, because not AppState::USERLEVEL_DEVELOPER" << std::endl;
   }
 }
 
@@ -2004,7 +2004,7 @@ void Document::load_after_layout_item_usesrelationship(const xmlpp::Element* ele
 
     if(!relationship)
     {
-      std::cerr << "Document::load_after_layout_item_usesrelationship(): relationship not found: " << relationship_name << ", in table:" << table_name << std::endl;
+      std::cerr << G_STRFUNC << ": relationship not found: " << relationship_name << ", in table:" << table_name << std::endl;
     }
   }
 
@@ -2013,7 +2013,7 @@ void Document::load_after_layout_item_usesrelationship(const xmlpp::Element* ele
   {
     sharedptr<Relationship> related_relationship = get_relationship(relationship->get_to_table(), related_relationship_name);
     if(!related_relationship)
-      std::cerr << "Document::load_after_layout_item_field(): related relationship not found in table=" << relationship->get_to_table() << ",  name=" << related_relationship_name << std::endl;
+      std::cerr << G_STRFUNC << ": related relationship not found in table=" << relationship->get_to_table() << ",  name=" << related_relationship_name << std::endl;
 
     item->set_related_relationship(related_relationship); 
   }
@@ -2417,7 +2417,7 @@ bool Document::load_after(int& failure_code)
 
       if(m_document_format_version > get_latest_known_document_format_version())
       {
-        std::cerr << "Document::load_after(): Loading failed because format_version=" << m_document_format_version << ", but latest known format version is " << get_latest_known_document_format_version() << std::endl;
+        std::cerr << G_STRFUNC << ": Loading failed because format_version=" << m_document_format_version << ", but latest known format version is " << get_latest_known_document_format_version() << std::endl;
         failure_code = LOAD_FAILURE_CODE_FILE_VERSION_TOO_NEW;
         return false;
       }
@@ -2470,7 +2470,7 @@ bool Document::load_after(int& failure_code)
             mode = HOSTING_MODE_SQLITE;
           else
 	  {
-            std::cerr << "Document::load_after(): Hosting mode " << attr_mode << " is not supported" << std::endl;
+            std::cerr << G_STRFUNC << ": Hosting mode " << attr_mode << " is not supported" << std::endl;
             return false; //TODO: Provide more information so the application (or Bakery) can say exactly why loading failed.
 	  }
         }
@@ -3618,7 +3618,7 @@ bool Document::save_before()
       if(group_name.empty())
       {
         //I saw this in at least one .glom file. murrayc.
-        std::cerr << "Document::save_before(): The group name is empty." << std::endl;
+        std::cerr << G_STRFUNC << ": The group name is empty." << std::endl;
         continue;
       }
 
@@ -3896,7 +3896,7 @@ sharedptr<const Relationship> Document::get_field_used_in_relationship_to_one(co
 
   if(!layout_field)
   {
-    std::cerr << "Document::get_field_used_in_relationship_to_one(): layout_field was null" << std::endl;
+    std::cerr << G_STRFUNC << ": layout_field was null" << std::endl;
     return result; 
   }
 
@@ -3904,7 +3904,7 @@ sharedptr<const Relationship> Document::get_field_used_in_relationship_to_one(co
   type_tables::const_iterator iterFind = m_tables.find(table_used);
   if(iterFind == m_tables.end())
   {
-    std::cerr << "Document::get_field_used_in_relationship_to_one(): table not found:" << table_used << std::endl;
+    std::cerr << G_STRFUNC << ": table not found:" << table_used << std::endl;
     return result; 
   }
 
diff --git a/glom/libglom/example_document_load.cc b/glom/libglom/example_document_load.cc
index 87269f5..0cef396 100644
--- a/glom/libglom/example_document_load.cc
+++ b/glom/libglom/example_document_load.cc
@@ -82,7 +82,7 @@ int main()
   }
   catch(const Glib::ConvertError& ex)
   {
-    std::cerr << "Exception from Glib::filename_to_uri(): " << ex.what();
+    std::cerr << G_STRFUNC << ": " << ex.what();
     return 1;
   }
 
diff --git a/glom/libglom/privs.cc b/glom/libglom/privs.cc
index 7b194e0..7af6b8c 100644
--- a/glom/libglom/privs.cc
+++ b/glom/libglom/privs.cc
@@ -228,7 +228,7 @@ void Privs::set_table_privileges(const Glib::ustring& group_name, const Glib::us
 
   const bool test = DbUtils::query_execute_string(strQuery);
   if(!test)
-    std::cerr << "Privs::set_table_privileges(): GRANT failed." << std::endl;
+    std::cerr << G_STRFUNC << ": GRANT failed." << std::endl;
   else
   {
     if( (table_name != GLOM_STANDARD_TABLE_AUTOINCREMENTS_TABLE_NAME) && privs.m_create )
@@ -395,13 +395,13 @@ bool Privs::get_user_is_in_group(const Glib::ustring& user, const Glib::ustring&
 
 bool Privs::on_privs_privileges_cache_timeout(const Glib::ustring& table_name)
 {
-  //std::cout << "DEBUG: Privs::on_privs_privileges_cache_timeou(): table=" << table_name << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": table=" << table_name << std::endl;
 
   //Forget the cached privileges after a few seconds:
   type_map_privileges::iterator iter = m_privileges_cache.find(table_name);
   if(iter != m_privileges_cache.end())
   {
-    //std::cout << "  DEBUG: Privs::on_privs_privileges_cache_timeou(): Cleared cache for table=" << table_name << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": Cleared cache for table=" << table_name << std::endl;
     m_privileges_cache.erase(iter);
   }
 
@@ -420,7 +420,7 @@ Privileges Privs::get_current_privs(const Glib::ustring& table_name)
   type_map_privileges::const_iterator iter = m_privileges_cache.find(table_name);
   if(iter != m_privileges_cache.end())
   {
-    //std::cout << "DEBUG: Privs::get_current_privs(): Returning cache." << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": Returning cache." << std::endl;
     return iter->second;
   }
 
@@ -428,7 +428,7 @@ Privileges Privs::get_current_privs(const Glib::ustring& table_name)
   //Get the up-to-date privileges from the database:
   Privileges result;
 
-  //std::cout << "DEBUG: Privs::get_current_privs(): Getting non-cached." << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": Getting non-cached." << std::endl;
 
   ConnectionPool* connection_pool = ConnectionPool::get_instance();
   const Glib::ustring current_user = connection_pool->get_user();
diff --git a/glom/libglom/python_embed/py_glom_record.cc b/glom/libglom/python_embed/py_glom_record.cc
index 1ba6454..b90fe2d 100644
--- a/glom/libglom/python_embed/py_glom_record.cc
+++ b/glom/libglom/python_embed/py_glom_record.cc
@@ -136,7 +136,7 @@ void PyGlomRecord::setitem(const boost::python::object& key, const boost::python
   sharedptr<const Field> field = m_document->get_field(m_table_name, field_name);
   if(!field)
   {
-     std::cerr << "PyGlomRecord::setitem(): field=" << field_name << " not found in table=" << m_table_name << std::endl;
+     std::cerr << G_STRFUNC << ": field=" << field_name << " not found in table=" << m_table_name << std::endl;
      //TODO: Throw python exception.
      return;
   }
@@ -158,19 +158,19 @@ void PyGlomRecord::setitem(const boost::python::object& key, const boost::python
   else
     field_value = Conversions::get_empty_value(field_type);
 
-  //std::cout << "debug: PyGlomRecord::setitem(): field_name=" << field_name << ", field_type=" << field_type << ", field_value=" << field_value.to_string() << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": field_name=" << field_name << ", field_type=" << field_type << ", field_value=" << field_value.to_string() << std::endl;
 
 
   //Set the value in the database:
   if(!m_key_field || Conversions::value_is_empty(m_key_field_value))
   {
-    std::cerr << "PyGlomRecord::setitem(): The primary key name and value is not set. This would be a Glom bug." << std::endl;
+    std::cerr << G_STRFUNC << ": The primary key name and value is not set. This would be a Glom bug." << std::endl;
     return;
   }
 
   if(!m_connection)
   {
-    std::cerr << "PyGlomRecord::setitem(): The connection is null. This would be a Glom bug." << std::endl;
+    std::cerr << G_STRFUNC << ": The connection is null. This would be a Glom bug." << std::endl;
     return;
   }
 
@@ -194,18 +194,18 @@ void PyGlomRecord::setitem(const boost::python::object& key, const boost::python
   }
   catch(const Glib::Exception& ex)
   {
-    std::cerr << "PyGlomRecord::setitem(): exception while executing query: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": exception while executing query: " << ex.what() << std::endl;
   }
   catch(const std::exception& ex)
   {
-    std::cerr << "PyGlomRecord::setitem(): exception while executing query: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": exception while executing query: " << ex.what() << std::endl;
   }
 
   if(!updated)
   {
     Glib::ustring failed_query;
 
-    std::cerr << "PyGlomRecord::setitem(): UPDATE failed." << std::endl;
+    std::cerr << G_STRFUNC << ": UPDATE failed." << std::endl;
     /*
     if(stmt)
       failed_query = stmt->to_sql(params); //this throws too.
@@ -234,7 +234,7 @@ void PyGlomRecord::set_fields(const PyGlomRecord::type_map_field_values& field_v
   for(type_map_field_values::const_iterator iter = field_values.begin(); iter != field_values.end(); ++iter)
   {
     const Gnome::Gda::Value value = iter->second;
-    std::cout << "DEBUG: PyGlomRecord::set_fields(): field name=" << iter->first << ", type=" << g_type_name(value.get_value_type()) << std::endl;
+    std::cout << "debug: " << G_STRFUNC << ": field name=" << iter->first << ", type=" << g_type_name(value.get_value_type()) << std::endl;
   }
   */
 
diff --git a/glom/libglom/python_embed/py_glom_relatedrecord.cc b/glom/libglom/python_embed/py_glom_relatedrecord.cc
index 99b089a..af03525 100644
--- a/glom/libglom/python_embed/py_glom_relatedrecord.cc
+++ b/glom/libglom/python_embed/py_glom_relatedrecord.cc
@@ -113,7 +113,7 @@ boost::python::object PyGlomRelatedRecord::getitem(const boost::python::object&
     {
       try
       {
-        std::cout << "Debug: PyGlomRelatedRecord::setitem()():  " << sql_query << std::endl;
+        std::cout << "debug: " << G_STRFUNC << ":  " << sql_query << std::endl;
       }
       catch(const Glib::Exception& ex)
       {
diff --git a/glom/libglom/python_embed/pygdavalue_conversions.cc b/glom/libglom/python_embed/pygdavalue_conversions.cc
index 4368ea9..11724e3 100644
--- a/glom/libglom/python_embed/pygdavalue_conversions.cc
+++ b/glom/libglom/python_embed/pygdavalue_conversions.cc
@@ -174,7 +174,7 @@ boost::python::object glom_pygda_value_as_boost_pyobject(const Glib::ValueBase&
           const int day = g_date_get_day(val);
 
           if(!g_date_valid(val))
-            std::cerr << "glom_pygda_value_as_boost_pyobject(): The GDate is not valid." << std::endl;
+            std::cerr << G_STRFUNC << ": The GDate is not valid." << std::endl;
             
           //std::cout << "DEBUG G_TYPE_DATE: year=" << year << ", month=" << month << ", day=" << day << std::endl;
           PyObject* cobject = PyDate_FromDate(year, month, day);
diff --git a/glom/libglom/sharedptr.h b/glom/libglom/sharedptr.h
index 3b94c1a..3586a75 100644
--- a/glom/libglom/sharedptr.h
+++ b/glom/libglom/sharedptr.h
@@ -341,14 +341,14 @@ void sharedptr<T_obj>::ref()
   {
     if(m_pRefCount == 0)
     {
-      //std::cout << "sharedptr::ref(): first ref" << std::endl;
+      //std::cout << "debug: " << G_STRFUNC << ": first ref" << std::endl;
       //First ref, so allocate the shared count:
       m_pRefCount = new size_type();
       *m_pRefCount = 1;
     }
     else
     {
-      //std::cout << "sharedptr::ref(): starting at" << *m_pRefCount << std::endl;
+      //std::cout << "debug: " << G_STRFUNC << ": starting at" << *m_pRefCount << std::endl;
       (*m_pRefCount)++;
     }
   }
@@ -360,7 +360,7 @@ void sharedptr<T_obj>::unref()
 {
   if(m_pRefCount)
   {
-    //std::cout << "sharedptr::unref(): starting at " << *m_pRefCount << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": starting at " << *m_pRefCount << std::endl;
 
     if( (*m_pRefCount) > 0 )
        (*m_pRefCount)--;
@@ -381,7 +381,7 @@ void sharedptr<T_obj>::unref()
   }
   else
   {
-    //std::cout << "sharedptr::unref(): ref not setup." << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": ref not setup." << std::endl;
   }
 
 }
diff --git a/glom/libglom/spawn_with_feedback.cc b/glom/libglom/spawn_with_feedback.cc
index ec24eaa..71099ad 100644
--- a/glom/libglom/spawn_with_feedback.cc
+++ b/glom/libglom/spawn_with_feedback.cc
@@ -418,7 +418,7 @@ bool execute_command_line_and_wait(const std::string& command, const SlotProgres
 
   if(!stderr_text.empty())
   {
-    std::cerr << "Glom: execute_command_line_and_wait(): command produced stderr text: " << std::endl <<
+    std::cerr << G_STRFUNC << ": command produced stderr text: " << std::endl <<
       "  command: " << command << std::endl << 
       "  error text: " << stderr_text << std::endl;
   }
@@ -465,7 +465,7 @@ namespace
     }
     catch(const Impl::SpawnError& ex)
     {
-      std::cerr << "Glom::execute_command_line_and_wait_until_second_command_returns_success(): Exception while calling Glib::spawn_command_line_sync(): " << ex.what() << std::endl;
+      std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
       // TODO: We should cancel the whole call if this fails three times in 
       // a row or so.
     }
@@ -599,7 +599,7 @@ bool execute_command_line_and_wait_until_second_command_returns_success(const st
       error_dialog->run();
       */
       
-      std::cerr << "Glom:  execute_command_line_and_wait_until_second_command_returns_success(): Child command failed. The command was: " << std::endl << stderr_text << std::endl;
+      std::cerr << G_STRFUNC << ": Child command failed. The command was: " << std::endl << stderr_text << std::endl;
     }
     else
     {
diff --git a/glom/libglom/utils.cc b/glom/libglom/utils.cc
index 9143f27..f805e3e 100644
--- a/glom/libglom/utils.cc
+++ b/glom/libglom/utils.cc
@@ -136,11 +136,11 @@ Glib::ustring Utils::string_replace(const Glib::ustring& src, const Glib::ustrin
 {
   if(search_for.empty())
   {
-    std::cerr << "Utils::string_replace(): search_for was empty." << std::endl;
+    std::cerr << G_STRFUNC << ": search_for was empty." << std::endl;
     return src;
   }
 
-  //std::cout << "debug: Utils::string_replace(): src=" << src << ", search_for=" << search_for << ", replace_with=" << replace_with << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": src=" << src << ", search_for=" << search_for << ", replace_with=" << replace_with << std::endl;
 
   std::string result = src;
 
@@ -356,7 +356,7 @@ void Utils::build_sql_select_add_fields_to_get(const Glib::RefPtr<Gnome::Gda::Sq
 
   if(!one_added)
   {
-    std::cerr << "Utils::build_sql_select_fields_to_get(): No fields added: fieldsToGet.size()=" << fieldsToGet.size() << std::endl;
+    std::cerr << G_STRFUNC << ": No fields added: fieldsToGet.size()=" << fieldsToGet.size() << std::endl;
     return;
   }
 }
@@ -496,7 +496,7 @@ Utils::type_list_values_with_second Utils::get_choice_values(const sharedptr<con
 
   builder->select_order_by(choice_field_id);
 
-  //std::cout << "debug: get_choice_values(): query: " << sql_query << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": query: " << sql_query << std::endl;
   //Connect to database:
   sharedptr<SharedConnection> connection = ConnectionPool::get_instance()->connect();
 
@@ -526,7 +526,7 @@ Utils::type_list_values_with_second Utils::get_choice_values(const sharedptr<con
   }
   else
   {
-      std::cerr << "Glom  get_choice_values(): Error while executing SQL" << std::endl <<
+      std::cerr << G_STRFUNC << ": Error while executing SQL" << std::endl <<
                    "  " <<  sql_query << std::endl;
   }
 
@@ -618,10 +618,10 @@ Glib::ustring Utils::create_local_image_uri(const Gnome::Gda::Value& value)
       }
     }
     else
-       std::cerr << "Utils::create_local_image_uri(): binary GdaValue contains no data." << std::endl;
+       std::cerr << G_STRFUNC << ": binary GdaValue contains no data." << std::endl;
   }
   //else
-  //  std::cerr << "Utils::create_local_image_uri(): type != BINARY" << std::endl;
+  //  std::cerr << G_STRFUNC << ": type != BINARY" << std::endl;
 
   if(result.empty())
     result = "/tmp/glom_report_image_invalid.png";
@@ -672,7 +672,7 @@ Glib::ustring Utils::title_from_string(const Glib::ustring& text)
 
 Utils::type_vec_strings Utils::string_separate(const Glib::ustring& str, const Glib::ustring& separator, bool ignore_quoted_separator)
 {
-  //std::cout << "Utils::string_separate(): separator=" << separator << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": separator=" << separator << std::endl;
 
   type_vec_strings result;
 
@@ -889,11 +889,11 @@ std::string Utils::sqlbuilder_get_full_query(
   }
   catch(const Glib::Exception& ex)
   {
-    std::cerr << "sqlbuilder_get_full_query(): exception while parsing query: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": exception while parsing query: " << ex.what() << std::endl;
   }
   catch(const std::exception& ex)
   {
-    std::cerr << "sqlbuilder_get_full_query(): exception while parsing query: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": exception while parsing query: " << ex.what() << std::endl;
   }
 
   //Convert to something that std::cout should be able to handle.
@@ -918,15 +918,15 @@ std::string Utils::sqlbuilder_get_full_query(
   }
   catch(const Gnome::Gda::SqlError& ex)
   {
-    std::cerr << "sqlbuilder_get_full_query(): SqlError exception while getting query: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": SqlError exception while getting query: " << ex.what() << std::endl;
   }
   catch(const Glib::Exception& ex)
   {
-    std::cerr << "sqlbuilder_get_full_query(): exception (" << typeid(ex).name() << ") while getting query: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": exception (" << typeid(ex).name() << ") while getting query: " << ex.what() << std::endl;
   }
   catch(const std::exception& ex)
   {
-    std::cerr << "sqlbuilder_get_full_query(): exception (" << typeid(ex).name() << ") while getting query: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": exception (" << typeid(ex).name() << ") while getting query: " << ex.what() << std::endl;
   }
 
   //Convert to something that std::cout should be able to handle.
@@ -946,7 +946,7 @@ Gnome::Gda::SqlExpr Utils::get_find_where_clause_quick(Document* document, const
 
   if(!document)
   {
-    std::cerr << "Utils::get_find_where_clause_quick(): document was null." << std::endl;
+    std::cerr << G_STRFUNC << ": document was null." << std::endl;
     return Gnome::Gda::SqlExpr();
   }
 
diff --git a/glom/main.cc b/glom/main.cc
index f9ee085..7011d2a 100644
--- a/glom/main.cc
+++ b/glom/main.cc
@@ -237,7 +237,7 @@ bool check_user_is_not_root_with_warning()
     message = ex.what();
   }
 #else
-  //std::cout << "ConnectionPool::check_user_is_not_root_with_warning(): geteuid()=" << geteuid() << ", getgid()=" << getgid() << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": geteuid()=" << geteuid() << ", getgid()=" << getgid() << std::endl;
 
   //This is very linux-specific. We should ifdef this out for other platforms.
   if(geteuid() == 0)
diff --git a/glom/mode_data/box_data_calendar_related.cc b/glom/mode_data/box_data_calendar_related.cc
index 62775c1..13e92be 100644
--- a/glom/mode_data/box_data_calendar_related.cc
+++ b/glom/mode_data/box_data_calendar_related.cc
@@ -75,7 +75,7 @@ bool Box_Data_Calendar_Related::init_db_details(const sharedptr<const LayoutItem
 
 bool Box_Data_Calendar_Related::init_db_details(const Glib::ustring& parent_table, bool show_title)
 {
-  //std::cout << "DEBUG: Box_Data_Calendar_Related::init_db_details(): " << parent_table << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": " << parent_table << std::endl;
 
   m_parent_table = parent_table;
 
@@ -392,7 +392,7 @@ Glib::ustring Box_Data_Calendar_Related::on_calendar_details(guint year, guint m
   sharedptr<LayoutItem_CalendarPortal> derived_portal = sharedptr<LayoutItem_CalendarPortal>::cast_dynamic(m_portal);
   if(!derived_portal)
   {
-    //std::cout << "DEBUG: Box_Data_Calendar_Related::on_calendar_details(): date_field is NULL" << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": date_field is NULL" << std::endl;
     return Glib::ustring();
   }
 
@@ -401,7 +401,7 @@ Glib::ustring Box_Data_Calendar_Related::on_calendar_details(guint year, guint m
     return Glib::ustring();
 
   //TODO: month seems to be 143710360 sometimes, which seems to be a GtkCalendar bug:
-  //std::cout << "Box_Data_Calendar_Related::on_calendar_details(): year=" << year << ", month=" << month << " day=" << day << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": year=" << year << ", month=" << month << " day=" << day << std::endl;
 
   //Glib::Date is 1-indexed:
   Glib::Date::Month datemonth = (Glib::Date::Month)(month +1);
diff --git a/glom/mode_data/box_data_details.cc b/glom/mode_data/box_data_details.cc
index 17facd6..3df98ac 100644
--- a/glom/mode_data/box_data_details.cc
+++ b/glom/mode_data/box_data_details.cc
@@ -181,13 +181,13 @@ void Box_Data_Details::set_found_set_from_primary_key_value()
   {
     m_found_set.m_where_clause = Utils::build_simple_where_expression(
        m_table_name, m_field_primary_key, m_primary_key_value);
-    //std::cout << "  DEBUG: Box_Data_Details::set_primary_key_value(): m_found_set.m_where_clause = " << m_found_set.m_where_clause << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": m_found_set.m_where_clause = " << m_found_set.m_where_clause << std::endl;
   }
 }
 
 bool Box_Data_Details::init_db_details(const FoundSet& found_set, const Glib::ustring& layout_platform, const Gnome::Gda::Value& primary_key_value)
 {
-  //std::cout << "Box_Data_Details::init_db_details(): primary_key_value=" << primary_key_value.to_string() << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": primary_key_value=" << primary_key_value.to_string() << std::endl;
 
   m_primary_key_value = primary_key_value;
   m_field_primary_key = get_field_primary_key_for_table(found_set.m_table_name);
@@ -245,7 +245,7 @@ void Box_Data_Details::create_layout()
 
 bool Box_Data_Details::fill_from_database()
 {
-  //std::cout << "Box_Data_Details::fill_from_database(): m_primary_key_value=" << m_primary_key_value.to_string() << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": m_primary_key_value=" << m_primary_key_value.to_string() << std::endl;
 
   //Don't try to open a connection if there is no document,
   //for instance, during application destruction.
@@ -562,7 +562,7 @@ void Box_Data_Details::on_related_record_added(Gnome::Gda::Value /* strKeyValue
   bool bDoNotRefreshRelated = m_bDoNotRefreshRelated;
   m_bDoNotRefreshRelated = true;
 
-  //std::cout << "Box_Data_Details::on_related_record_added(): " << strKeyValue << ", " << strFromKeyName << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": " << strKeyValue << ", " << strFromKeyName << std::endl;
   //Get current FromKey value:
 
  /* TODO_port
@@ -722,7 +722,7 @@ void Box_Data_Details::on_flowtable_field_edited(const sharedptr<const LayoutIte
   Document* document = dynamic_cast<Document*>(get_document());
 
   Gnome::Gda::Value primary_key_value = get_primary_key_value_selected();
-  //std::cout << "Box_Data_Details::on_flowtable_field_edited(): primary_key_value=" << primary_key_value.to_string() << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": primary_key_value=" << primary_key_value.to_string() << std::endl;
   if(!Conversions::value_is_empty(primary_key_value)) //If there is not a primary key value:
   {
     Glib::ustring table_name;
diff --git a/glom/mode_data/box_data_list.cc b/glom/mode_data/box_data_list.cc
index 57e72c5..b9230db 100644
--- a/glom/mode_data/box_data_list.cc
+++ b/glom/mode_data/box_data_list.cc
@@ -94,7 +94,7 @@ void Box_Data_List::refresh_data_from_database_blank()
   found_set.m_where_clause = Gnome::Gda::SqlExpr();
   m_AddDel.set_found_set(found_set);
 
-  std::cout << "debug: Box_Data_List::refresh_data_from_database_blank(): before refresh_from_database_blank()." << std::endl;
+  std::cout << "debug: " << G_STRFUNC << ": before refresh_from_database_blank()." << std::endl;
   m_AddDel.refresh_from_database_blank();
   m_found_set = found_set;
 }
@@ -278,7 +278,7 @@ void Box_Data_List::on_details_nav_next()
     //Don't go past the last record:
     if( !m_AddDel.get_is_last_row(iter) )
     {
-      std::cout << "DEBUG: Box_Data_List::on_details_nav_next(): The current row was not the last row." << std::endl;
+      std::cout << "debug: " << G_STRFUNC << ": The current row was not the last row." << std::endl;
 
       iter++;
       m_AddDel.select_item(iter);
@@ -286,7 +286,7 @@ void Box_Data_List::on_details_nav_next()
       signal_user_requested_details().emit(m_AddDel.get_value_key_selected());
     }
     else
-      std::cout << "DEBUG: Box_Data_List::on_details_nav_next(): Not going past the last row." << std::endl;
+      std::cout << "debug: " << G_STRFUNC << ": Not going past the last row." << std::endl;
   }
 }
 
@@ -348,7 +348,7 @@ Gnome::Gda::Value Box_Data_List::get_primary_key_value_selected() const
 
 Gnome::Gda::Value Box_Data_List::get_primary_key_value_first() const
 {
-  //std::cout << "Box_Data_List(): get_primary_key_value_first() records_count = " << m_AddDel.get_count() << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": get_primary_key_value_first() records_count = " << m_AddDel.get_count() << std::endl;
 
   Glib::RefPtr<Gtk::TreeModel> model = m_AddDel.get_model();
   if(model)
@@ -359,18 +359,18 @@ Gnome::Gda::Value Box_Data_List::get_primary_key_value_first() const
       Gnome::Gda::Value value = get_primary_key_value(iter);
       if(Conversions::value_is_empty(value))
       {
-       //std::cout << "Box_Data_List(): get_primary_key_value_first() iter val is NULL" << std::endl;
+       //std::cout << "debug: " << G_STRFUNC << ": get_primary_key_value_first() iter val is NULL" << std::endl;
         ++iter;
       }
       else
       {
-         //std::cout << "Box_Data_List(): get_primary_key_value_first() returning: " << value.to_string() << std::endl;
+         //std::cout << "debug: " << G_STRFUNC << ": get_primary_key_value_first() returning: " << value.to_string() << std::endl;
         return value;
       }
     }
   }
 
- // std::cout << "Box_Data_List(): get_primary_key_value_first() return NULL" << std::endl;
+ // std::cout << "debug: " << G_STRFUNC << ": get_primary_key_value_first() return NULL" << std::endl;
   return Gnome::Gda::Value();
 }
 
@@ -425,7 +425,7 @@ void Box_Data_List::create_layout_add_group(const sharedptr<LayoutGroup>& layout
         //This could probably only happen if we have failed to rename something everywhere, when the user has renamed something.
         if(!DbUtils::get_field_exists_in_database(child_field->get_table_used(m_table_name), child_field->get_name()))
         {
-          std::cerr << "debug: Box_Data_List::create_layout_add_group(): Field does not exist in database: table_name=" << child_field->get_table_used(m_table_name) << ", field_name=" << child_field->get_name() << std::endl;
+          std::cerr << G_STRFUNC << ": Field does not exist in database: table_name=" << child_field->get_table_used(m_table_name) << ", field_name=" << child_field->get_name() << std::endl;
           continue;
         }
       }
@@ -459,11 +459,11 @@ void Box_Data_List::create_layout()
     sharedptr<Field> field_primary_key = get_field_primary_key_for_table(m_table_name);
     if(!field_primary_key)
     {
-      std::cerr << "Box_Data_List::create_layout(): primary key not found." << std::endl;
+      std::cerr << G_STRFUNC << ": primary key not found." << std::endl;
     }
     else
     {
-      //std::cout << "DEBUG: Box_Data_List::create_layout(): primary_key=" << field_primary_key->get_name() << std::endl;
+      //std::cout << "debug: " << G_STRFUNC << ": primary_key=" << field_primary_key->get_name() << std::endl;
 
       m_AddDel.set_key_field(field_primary_key);
 
diff --git a/glom/mode_data/box_data_list_related.cc b/glom/mode_data/box_data_list_related.cc
index 62b810e..7390014 100644
--- a/glom/mode_data/box_data_list_related.cc
+++ b/glom/mode_data/box_data_list_related.cc
@@ -185,7 +185,7 @@ void Box_Data_List_Related::on_adddel_user_requested_edit(const Gtk::TreeModel::
   //Call base class:
   
   const Gnome::Gda::Value primary_key_value = m_AddDel.get_value_key(row); //The primary key is in the key.
-  //std::cout << "on_adddel_user_requested_edit(): Requesting edit for primary_key=" << primary_key_value.to_string() << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": Requesting edit for primary_key=" << primary_key_value.to_string() << std::endl;
   signal_user_requested_details().emit(primary_key_value);
 }
 
@@ -251,7 +251,7 @@ void Box_Data_List_Related::on_adddel_record_added(const Gtk::TreeModel::iterato
   //primary_key_value is a new autogenerated or human-entered key for the row.
   //It has already been added to the database.
   //Gnome::Gda::Value primary_key_value = m_AddDel.get_value_key(row);
-  //std::cout << "Box_Data_List_Related::on_adddel_record_added(): primary_key_value=" << primary_key_value.to_string() << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": primary_key_value=" << primary_key_value.to_string() << std::endl;
 
 
   if(!row)
@@ -294,11 +294,11 @@ void Box_Data_List_Related::on_adddel_record_added(const Gtk::TreeModel::iterato
       layout_item->set_full_field_details(m_key_field);
 
       //TODO: Although the to-field value is visible on the new related record, get_value() returns NULL so you can't immediately navigate to the new record: 
-      //std::cout << "DEBUG: Box_Data_List_Related::on_record_added(): setting field=" << layout_item->get_name() << "m_key_value=" << m_key_value.to_string() << std::endl; 
+      //std::cout << "debug: " << G_STRFUNC << ": setting field=" << layout_item->get_name() << "m_key_value=" << m_key_value.to_string() << std::endl; 
       m_AddDel.set_value(row, layout_item, m_key_value);
     }
     else
-      std::cerr << "Box_Data_List_Related::on_record_added(): m_key_field is NULL" << std::endl;
+      std::cerr << G_STRFUNC << ": m_key_field is NULL" << std::endl;
   
 
     //on_adddel_user_changed(row, iKey); //Update the database.
@@ -468,7 +468,7 @@ void Box_Data_List_Related::create_layout_add_group(const sharedptr<LayoutGroup>
         //This could probably only happen if we have failed to rename something everywhere, when the user has renamed something.
         if(!DbUtils::get_field_exists_in_database(child_field->get_table_used(Base_DB_Table::m_table_name), child_field->get_name()))
         {
-          std::cerr << "debug: Box_Data_List_Related::create_layout_add_group(): Field does not exist in database: table_name=" << child_field->get_table_used(Base_DB_Table::m_table_name) << ", field_name=" << child_field->get_name() << std::endl;
+          std::cerr << G_STRFUNC << ": Field does not exist in database: table_name=" << child_field->get_table_used(Base_DB_Table::m_table_name) << ", field_name=" << child_field->get_name() << std::endl;
           continue;
         }
       }
diff --git a/glom/mode_data/box_data_portal.cc b/glom/mode_data/box_data_portal.cc
index 8b90f4d..31d2cb8 100644
--- a/glom/mode_data/box_data_portal.cc
+++ b/glom/mode_data/box_data_portal.cc
@@ -90,18 +90,18 @@ void Box_Data_Portal::make_record_related(const Gnome::Gda::Value& related_recor
   //Create the link by setting the foreign key
   if(!m_key_field)
   {
-    std::cerr << "Box_Data_Portal::make_record_related(): m_key_field was null." << std::endl;
+    std::cerr << G_STRFUNC << ": m_key_field was null." << std::endl;
   }
 
   if(Conversions::value_is_empty(m_key_value))
   {
-    std::cerr << "Box_Data_Portal::make_record_related(): m_key_value was empty." << std::endl;
+    std::cerr << G_STRFUNC << ": m_key_value was empty." << std::endl;
   }
 
 
   if(!m_portal)
   {
-    std::cerr << "Box_Data_Portal::make_record_related(): m_portal was null." << std::endl;
+    std::cerr << G_STRFUNC << ": m_portal was null." << std::endl;
   }
 
   const Glib::ustring target_table = m_portal->get_table_used(Glib::ustring() /* not relevant */);
@@ -113,11 +113,11 @@ void Box_Data_Portal::make_record_related(const Gnome::Gda::Value& related_recor
         builder->add_field_id(field_primary_key->get_name(), target_table),
         builder->add_expr_as_value(related_record_primary_key_value)));
 
-  //std::cout << "Box_Data_Portal::make_record_related(): setting value in db=" << primary_key_value.to_string() << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": setting value in db=" << primary_key_value.to_string() << std::endl;
   const bool test = DbUtils::query_execute(builder);
   if(!test)
   {
-    std::cerr << "Box_Data_Portal::make_record_related(): SQL query failed." << std::endl;
+    std::cerr << G_STRFUNC << ": SQL query failed." << std::endl;
   }
 }
 
@@ -313,7 +313,7 @@ bool Box_Data_Portal::init_db_details(const Glib::ustring& parent_table, bool sh
 bool Box_Data_Portal::refresh_data_from_database_with_foreign_key(const Gnome::Gda::Value& foreign_key_value)
 {
   m_key_value = foreign_key_value;
-  //std::cout << "DEBUG: Box_Data_Portal::refresh_data_from_database_with_foreign_key(): m_key_value=" << m_key_value.to_string() << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": m_key_value=" << m_key_value.to_string() << std::endl;
 
 
   if(m_key_field && m_portal)
@@ -323,7 +323,7 @@ bool Box_Data_Portal::refresh_data_from_database_with_foreign_key(const Gnome::G
       FoundSet found_set;
       set_found_set_where_clause_for_portal(found_set, m_portal, m_key_value);
 
-      //std::cout << "DEBUG: refresh_data_from_database_with_foreign_key(): where_clause=" << found_set.m_where_clause << std::endl;
+      //std::cout << "debug: " << G_STRFUNC << ": where_clause=" << found_set.m_where_clause << std::endl;
       return Box_Data::refresh_data_from_database_with_where_clause(found_set);
     }
     else
@@ -435,7 +435,7 @@ void Box_Data_Portal::get_suitable_table_to_view_details(Glib::ustring& table_na
     //std::cout << "debug: auto main=" << navigation_relationship_main << ", navigation_relationship=" << (navigation_relationship ? navigation_relationship->get_name() : navigation_relationship->get_relationship()->get_name()) << std::endl;
   }
   //else
-  //  std::cout << "debug: get_suitable_table_to_view_details(): Using specific nav." << std::endl;
+  //  std::cout << "debug: " << G_STRFUNC << ": Using specific nav." << std::endl;
 
   const Document* document = get_document();
   if(!document)
@@ -459,13 +459,13 @@ void Box_Data_Portal::get_suitable_table_to_view_details(Glib::ustring& table_na
 
   if(navigation_table_name.empty())
   {
-    //std::cerr << "Box_Data_Portal::get_suitable_table_to_view_details(): navigation_table_name is empty." << std::endl;
+    //std::cerr << G_STRFUNC << ": navigation_table_name is empty." << std::endl;
     return;
   }
 
   if(document->get_table_is_hidden(navigation_table_name))
   {
-    std::cerr << "Box_Data_Portal::get_suitable_table_to_view_details(): navigation_table_name indicates a hidden table: " << navigation_table_name << std::endl;
+    std::cerr << G_STRFUNC << ": navigation_table_name indicates a hidden table: " << navigation_table_name << std::endl;
     return;
   }
 
@@ -519,14 +519,14 @@ void Box_Data_Portal::get_suitable_record_to_view_details(const Gnome::Gda::Valu
     //Set the output parameters:
     table_name = navigation_table_name;
     table_primary_key_value = data_model->get_value_at(0, 0);
-    //std::cout << "Box_Data_Portal::get_suitable_record_to_view_details(): table_primary_key_value=" << table_primary_key_value.to_string() << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": table_primary_key_value=" << table_primary_key_value.to_string() << std::endl;
 
     //The value is empty when there there is no record to match the key in the related table:
     //For instance, if an invoice lines record mentions a product id, but the product does not exist in the products table.
     if(Conversions::value_is_empty(table_primary_key_value))
     {
       value_found = false;
-      std::cout << "debug: Box_Data_Portal::get_suitable_record_to_view_details(): SQL query returned empty primary key." << std::endl;
+      std::cout << "debug: " << G_STRFUNC << ": SQL query returned empty primary key." << std::endl;
     }
   }
   else
diff --git a/glom/mode_data/datawidget/combo_as_radio_buttons.cc b/glom/mode_data/datawidget/combo_as_radio_buttons.cc
index d8864c6..8598352 100644
--- a/glom/mode_data/datawidget/combo_as_radio_buttons.cc
+++ b/glom/mode_data/datawidget/combo_as_radio_buttons.cc
@@ -210,7 +210,7 @@ void ComboAsRadioButtons::set_text(const Glib::ustring& text)
     }
   }
 
-  //std::cerr << "ComboAsRadioButtons::set_text(): no item found for: " << text << std::endl;
+  //std::cerr << G_STRFUNC << ": no item found for: " << text << std::endl;
 }
 
 Gnome::Gda::Value ComboAsRadioButtons::get_value() const
diff --git a/glom/mode_data/datawidget/datawidget.cc b/glom/mode_data/datawidget/datawidget.cc
index 63d26de..fee40b6 100644
--- a/glom/mode_data/datawidget/datawidget.cc
+++ b/glom/mode_data/datawidget/datawidget.cc
@@ -316,7 +316,7 @@ void DataWidget::set_value(const Gnome::Gda::Value& value)
   if(generic_field_widget)
   {
     //if(generic_field_widget->get_layout_item())
-    //  std::cout << "DataWidget::set_value(): generic_field_widget->get_layout_item()->get_name()=" << generic_field_widget->get_layout_item()->get_name() << std::endl;
+    //  std::cout << "debug: " << G_STRFUNC << ": generic_field_widget->get_layout_item()->get_name()=" << generic_field_widget->get_layout_item()->get_name() << std::endl;
 
     generic_field_widget->set_value(value);
   }
diff --git a/glom/mode_data/flowtablewithfields.cc b/glom/mode_data/flowtablewithfields.cc
index f20d375..e579b7e 100644
--- a/glom/mode_data/flowtablewithfields.cc
+++ b/glom/mode_data/flowtablewithfields.cc
@@ -340,7 +340,7 @@ void FlowTableWithFields::add_layout_portal_at_position(const sharedptr<LayoutIt
     add_layoutwidgetbase(portal_box, add_before);
   }
   else
-    std::cerr << "FlowTableWithFields::add_layout_portal_at_position(): No portal was created." << std::endl;
+    std::cerr << G_STRFUNC << ": No portal was created." << std::endl;
 }
 
 void FlowTableWithFields::add_layout_notebook_at_position(const sharedptr<LayoutItem_Notebook>& notebook, const type_list_layoutwidgets::iterator& add_before)
@@ -883,7 +883,7 @@ FlowTableWithFields::type_portals FlowTableWithFields::get_portals(const sharedp
       }
       else
       {
-        std::cerr << "FlowTableWithFields::get_portals(): get_portal() returned NULL." << std::endl;
+        std::cerr << G_STRFUNC << ": get_portal() returned NULL." << std::endl;
       }
     }
   }
@@ -1127,7 +1127,7 @@ void FlowTableWithFields::on_datawidget_layout_item_added(LayoutWidgetBase::enum
   sharedptr<const LayoutItem> layout_item = pDataWidget->get_layout_item();
   if(!layout_item)
   {
-    std::cerr << "FlowTableWithFields::on_datawidget_layout_item_added(): layout_item is null." << std::endl;
+    std::cerr << G_STRFUNC << ": layout_item is null." << std::endl;
     return;
   }
 
@@ -1137,7 +1137,7 @@ void FlowTableWithFields::on_datawidget_layout_item_added(LayoutWidgetBase::enum
   sharedptr<LayoutGroup> layout_group = sharedptr<LayoutGroup>::cast_dynamic(get_layout_item());
   if(!layout_group)
   {
-    std::cerr << "FlowTableWithFields::on_datawidget_layout_item_added(): layout_group is null." << std::endl;
+    std::cerr << G_STRFUNC << ": layout_group is null." << std::endl;
     return;
   }
 
@@ -1383,7 +1383,7 @@ void FlowTableWithFields::on_dnd_add_layout_item_by_type(int item_type_num, Gtk:
       on_dnd_add_layout_portal(above);
       break;
     default:
-      std::cerr << "FlowTableWithFields::on_dnd_add_layout_item(): Unknown drop type: " << item_type << std::endl;
+      std::cerr << G_STRFUNC << ": Unknown drop type: " << item_type << std::endl;
    }
 }
 
diff --git a/glom/mode_data/notebook_data.cc b/glom/mode_data/notebook_data.cc
index 0176cfb..82970bd 100644
--- a/glom/mode_data/notebook_data.cc
+++ b/glom/mode_data/notebook_data.cc
@@ -181,7 +181,7 @@ bool Notebook_Data::init_db_details(const FoundSet& found_set, const Gnome::Gda:
       m_Box_Details.init_db_details(found_set, get_active_layout_platform(get_document()), primary_key_for_details);
     }
     else
-      std::cerr << "Notebook_Data::init_db_details(): document is NULL" << std::endl;
+      std::cerr << G_STRFUNC << ": document is NULL" << std::endl;
   }
 
 
diff --git a/glom/mode_design/dialog_database_preferences.cc b/glom/mode_design/dialog_database_preferences.cc
index af7ca02..165227f 100644
--- a/glom/mode_design/dialog_database_preferences.cc
+++ b/glom/mode_design/dialog_database_preferences.cc
@@ -141,7 +141,7 @@ void Dialog_Database_Preferences::on_treeview_cell_edited_next_value(const Glib:
 
     const bool test = DbUtils::query_execute(builder);
     if(!test)
-      std::cerr << "Dialog_Database_Preferences::on_treeview_cell_edited_next_value(): UPDATE failed." << std::endl;
+      std::cerr << G_STRFUNC << ": UPDATE failed." << std::endl;
   }
 }
 
@@ -187,7 +187,7 @@ void Dialog_Database_Preferences::load_from_document()
   Glib::RefPtr<Gnome::Gda::DataModel> datamodel = DbUtils::query_execute_select(builder);
   if(!datamodel)
   {
-    std::cerr << "Dialog_Database_Preferences::load_from_document(): Gda::DataModel is NULL." << std::endl;
+    std::cerr << G_STRFUNC << ": Gda::DataModel is NULL." << std::endl;
     return;
   }
 
diff --git a/glom/mode_design/fields/box_db_table_definition.cc b/glom/mode_design/fields/box_db_table_definition.cc
index 75629f4..bc33ae8 100644
--- a/glom/mode_design/fields/box_db_table_definition.cc
+++ b/glom/mode_design/fields/box_db_table_definition.cc
@@ -239,7 +239,7 @@ void Box_DB_Table_Definition::on_adddel_delete(const Gtk::TreeModel::iterator& r
         get_document()->remove_field(m_table_name, name);
       }
       else
-        std::cerr << "Box_DB_Table_Definition::on_adddel_delete(): field deletion failed." << std::endl;
+        std::cerr << G_STRFUNC << ": field deletion failed." << std::endl;
     }
   }
 
@@ -351,7 +351,7 @@ void Box_DB_Table_Definition::on_adddel_changed(const Gtk::TreeModel::iterator&
     //Get DB field info: (TODO: This might be unnecessary).
     type_vec_fields::const_iterator iterFind = std::find_if( m_vecFields.begin(), m_vecFields.end(), predicate_FieldHasName<Field>(strFieldNameBeingEdited) );
     if(iterFind == m_vecFields.end()) //If it was not found:
-      std::cerr << "Box_DB_Table_Definition::on_adddel_changed(): field not found: " << strFieldNameBeingEdited << std::endl;
+      std::cerr << G_STRFUNC << ": field not found: " << strFieldNameBeingEdited << std::endl;
     else
     {
       sharedptr<const Field> constfield = *iterFind;
@@ -644,7 +644,7 @@ bool Box_DB_Table_Definition::field_has_null_values(const sharedptr<const Field>
   }
   else
   {
-    std::cerr << "Box_DB_Table_Definition::field_has_null_values(): query failed." << std::endl;
+    std::cerr << G_STRFUNC << ": query failed." << std::endl;
   }
 
   return null_count > 0; 
diff --git a/glom/mode_design/fields/dialog_fielddefinition.cc b/glom/mode_design/fields/dialog_fielddefinition.cc
index e3fbd27..5d17274 100644
--- a/glom/mode_design/fields/dialog_fielddefinition.cc
+++ b/glom/mode_design/fields/dialog_fielddefinition.cc
@@ -152,7 +152,7 @@ void Dialog_FieldDefinition::set_field(const sharedptr<const Field>& field, cons
   layout_item->set_full_field_details(field_default_value);
   m_pDataWidget_DefaultValueSimple = Gtk::manage( new DataWidget(layout_item, "", get_document()) );
   if(!m_pDataWidget_DefaultValueSimple->get_data_child_widget())
-    std::cerr << "Dialog_FieldDefinition::set_field(): The DataWidget did not create a child widget." << std::endl;
+    std::cerr << G_STRFUNC << ": The DataWidget did not create a child widget." << std::endl;
 
   on_foreach_connect(*m_pDataWidget_DefaultValueSimple);
 
diff --git a/glom/mode_design/iso_codes.cc b/glom/mode_design/iso_codes.cc
index 10e7715..e1907e1 100644
--- a/glom/mode_design/iso_codes.cc
+++ b/glom/mode_design/iso_codes.cc
@@ -113,7 +113,7 @@ Glib::ustring get_locale_name(const Glib::ustring& locale_id)
     }
     catch(const Glib::FileError& ex)
     {
-      std::cerr << "Glom: get_locale_name(): Could not open (or read) glibc locales directory: " << locales_path << "Error: " << ex.what() << std::endl;
+      std::cerr << G_STRFUNC << ": Could not open (or read) glibc locales directory: " << locales_path << "Error: " << ex.what() << std::endl;
     }
 
     //Get the (translated) language names:
diff --git a/glom/mode_design/layout/combobox_fields.cc b/glom/mode_design/layout/combobox_fields.cc
index c17e462..2d0a861 100644
--- a/glom/mode_design/layout/combobox_fields.cc
+++ b/glom/mode_design/layout/combobox_fields.cc
@@ -98,7 +98,7 @@ void ComboBox_Fields::set_selected_field(const Glib::ustring& field_name)
   }
 
   //Not found, so mark it as blank:
-  //std::cerr << "ComboBox_Fields::set_selected_field(): field not found in list: " << field_name << std::endl;
+  //std::cerr << G_STRFUNC << ": field not found in list: " << field_name << std::endl;
 
   //Avoid calling unset_active() if nothing is selected, because it triggers the changed signal unnecessarily.
   if(get_active()) //If something is active (selected).
diff --git a/glom/mode_design/layout/combobox_relationship.cc b/glom/mode_design/layout/combobox_relationship.cc
index 4536e58..95dd983 100644
--- a/glom/mode_design/layout/combobox_relationship.cc
+++ b/glom/mode_design/layout/combobox_relationship.cc
@@ -144,7 +144,7 @@ void ComboBox_Relationship::set_selected_relationship(const Glib::ustring& relat
   }
 
   //Not found, so mark it as blank:
-  //std::cerr << "ComboBox_Relationship::set_selected_relationship(): relationship not found in list: " << relationship_name << std::endl;
+  //std::cerr << G_STRFUNC << ": relationship not found in list: " << relationship_name << std::endl;
 
   //Avoid calling unset_active() if nothing is selected, because it triggers the changed signal unnecessarily.
   if(get_active()) //If something is active (selected).
@@ -242,7 +242,7 @@ void ComboBox_Relationship::on_cell_data_title(const Gtk::TreeModel::const_itera
   }
   else
   {
-    //std::cerr << "ComboBox_Relationship::on_cell_data_title(): empty relationship and no m_extra_table_name. m_extra_table_name=" << m_extra_table_name << std::endl;
+    //std::cerr << G_STRFUNC << ": empty relationship and no m_extra_table_name. m_extra_table_name=" << m_extra_table_name << std::endl;
   }
 }
 
diff --git a/glom/mode_design/layout/dialog_layout_calendar_related.cc b/glom/mode_design/layout/dialog_layout_calendar_related.cc
index bc1b12e..93762e5 100644
--- a/glom/mode_design/layout/dialog_layout_calendar_related.cc
+++ b/glom/mode_design/layout/dialog_layout_calendar_related.cc
@@ -250,9 +250,9 @@ void Dialog_Layout_Calendar_Related::update_ui(bool including_relationship_list)
 
   sharedptr<Field> debugfield = m_portal->get_date_field();
   if(!debugfield)
-    std::cout << "DEBUG: set_document(): date field is NULL" << std::endl;
+    std::cout << "debug: " << G_STRFUNC << ": date field is NULL" << std::endl;
   else
-    std::cout << "DEBUG: set_document(): date field:" << debugfield->get_name() << std::endl;
+    std::cout << "debug: " << G_STRFUNC << ": date field:" << debugfield->get_name() << std::endl;
   
   m_combobox_date_field->set_fields(document, related_table_name, Field::TYPE_DATE);
   m_combobox_date_field->set_selected_field(m_portal->get_date_field());
@@ -314,9 +314,9 @@ void Dialog_Layout_Calendar_Related::save_to_document()
     
     sharedptr<Field> debugfield = m_portal->get_date_field();
     if(!debugfield)
-      std::cout << "DEBUG: save_to_document(): date field is NULL" << std::endl;
+      std::cout << "debug: " << G_STRFUNC << ": date field is NULL" << std::endl;
     else
-      std::cout << "DEBUG: save_to_document(): date field:" << debugfield->get_name() << std::endl;
+      std::cout << "debug: " << G_STRFUNC << ": date field:" << debugfield->get_name() << std::endl;
   }
 }
 
diff --git a/glom/mode_design/layout/dialog_layout_details.cc b/glom/mode_design/layout/dialog_layout_details.cc
index 477abff..1c1e6c6 100644
--- a/glom/mode_design/layout/dialog_layout_details.cc
+++ b/glom/mode_design/layout/dialog_layout_details.cc
@@ -229,12 +229,12 @@ void Dialog_Layout_Details::fill_group(const Gtk::TreeModel::iterator& iter, sha
       sharedptr<LayoutItem_Portal> layout_portal = sharedptr<LayoutItem_Portal>::cast_dynamic(layout_item);
       if(layout_portal)
       {
-        //std::cout << "fill_group(): adding portal." << std::endl;
+        //std::cout << "debug: " << G_STRFUNC << ": adding portal." << std::endl;
         group->add_item(glom_sharedptr_clone(layout_portal));
       }
       else
       {
-        //std::cout << "fill_group(): adding group." << std::endl;
+        //std::cout << "debug: " << G_STRFUNC << ": adding group." << std::endl;
         sharedptr<LayoutGroup> layout_group = sharedptr<LayoutGroup>::cast_dynamic(layout_item);
         sharedptr<LayoutItem_Portal> layout_portal = sharedptr<LayoutItem_Portal>::cast_dynamic(layout_group);
         if(layout_group && !layout_portal)
@@ -246,7 +246,7 @@ void Dialog_Layout_Details::fill_group(const Gtk::TreeModel::iterator& iter, sha
         }
         else if(layout_item)
         {
-          //std::cout << "fill_group(): adding item." << std::endl;
+          //std::cout << "debug: " << G_STRFUNC << ": adding item." << std::endl;
 
           //Add field or button:
           sharedptr<LayoutItem> item = glom_sharedptr_clone(layout_item);
diff --git a/glom/mode_design/print_layouts/window_print_layout_edit.cc b/glom/mode_design/print_layouts/window_print_layout_edit.cc
index f96c641..17f0ace 100644
--- a/glom/mode_design/print_layouts/window_print_layout_edit.cc
+++ b/glom/mode_design/print_layouts/window_print_layout_edit.cc
@@ -409,7 +409,7 @@ sharedptr<LayoutItem> Window_PrintLayout_Edit::create_empty_item(PrintLayoutTool
   }
   else
   {
-    std::cerr << "Window_PrintLayout_Edit::create_empty_item(): Unhandled item type: " << item_type << std::endl;
+    std::cerr << G_STRFUNC << ": Unhandled item type: " << item_type << std::endl;
   }
 
   return layout_item;
diff --git a/glom/mode_design/report_layout/dialog_layout_report.cc b/glom/mode_design/report_layout/dialog_layout_report.cc
index 32f2370..c34ab45 100644
--- a/glom/mode_design/report_layout/dialog_layout_report.cc
+++ b/glom/mode_design/report_layout/dialog_layout_report.cc
@@ -267,7 +267,7 @@ void Dialog_Layout_Report::fill_group_children(const sharedptr<LayoutGroup>& gro
       if(child_group)
         fill_group_children(child_group, iterChild, model);
 
-      //std::cout << "fill_report_parts(): Adding group child: parent part type=" << group->get_part_type_name() << ", child part type=" << item->get_part_type_name() << std::endl;
+      //std::cout << "debug: " << G_STRFUNC << ": Adding group child: parent part type=" << group->get_part_type_name() << ", child part type=" << item->get_part_type_name() << std::endl;
       group->add_item(item);
     }
 
diff --git a/glom/mode_design/translation/combobox_locale.cc b/glom/mode_design/translation/combobox_locale.cc
index 72fcbb8..ce149ce 100644
--- a/glom/mode_design/translation/combobox_locale.cc
+++ b/glom/mode_design/translation/combobox_locale.cc
@@ -92,7 +92,7 @@ void ComboBox_Locale::set_selected_locale(const Glib::ustring& locale)
   }
 
   //Not found, so mark it as blank:
-  std::cerr << "ComboBox_Locale::set_selected_locale(): locale not found in list: " << locale << std::endl;
+  std::cerr << G_STRFUNC << ": locale not found in list: " << locale << std::endl;
   unset_active();
 }
 
diff --git a/glom/mode_design/users/dialog_groups_list.cc b/glom/mode_design/users/dialog_groups_list.cc
index 7dc2552..f083705 100644
--- a/glom/mode_design/users/dialog_groups_list.cc
+++ b/glom/mode_design/users/dialog_groups_list.cc
@@ -225,7 +225,7 @@ void Dialog_GroupsList::on_button_group_delete()
           const Glib::ustring strQuery = "DROP GROUP \"" + group + "\"";
           const bool test = DbUtils::query_execute_string(strQuery);
           if(!test)
-            std::cerr << "Box_DB_Table_Definition::on_adddel_delete(): DROP GROUP failed." << std::endl;
+            std::cerr << G_STRFUNC << ": DROP GROUP failed." << std::endl;
 
           fill_group_list();
         }
@@ -255,7 +255,7 @@ void Dialog_GroupsList::on_button_group_new()
     const Glib::ustring strQuery = "CREATE GROUP \"" + group_name + "\"";
     const bool test = DbUtils::query_execute_string(strQuery);
     if(!test)
-      std::cout << "Dialog_GroupsList::on_button_group_new(): CREATE GROUP failed." << std::endl;
+      std::cout << "debug: " << G_STRFUNC << ": CREATE GROUP failed." << std::endl;
 
     //Give the new group some sensible default privileges:
     Privileges priv;
@@ -482,7 +482,7 @@ bool Dialog_GroupsList::set_table_privilege(const Glib::ustring& table_name, con
 
   const bool test = DbUtils::query_execute_string(strQuery); //TODO: Handle errors.
   if(!test)
-    std::cerr << "Dialog_GroupsList::set_table_privilege(): GRANT/REVOKE failed." << std::endl;
+    std::cerr << G_STRFUNC << ": GRANT/REVOKE failed." << std::endl;
 
   return test;
 }
diff --git a/glom/mode_design/users/dialog_users_list.cc b/glom/mode_design/users/dialog_users_list.cc
index 53202ea..1cee708 100644
--- a/glom/mode_design/users/dialog_users_list.cc
+++ b/glom/mode_design/users/dialog_users_list.cc
@@ -205,7 +205,7 @@ void Dialog_UsersList::on_button_user_add()
     const Glib::ustring strQuery = "ALTER GROUP \"" + m_combo_group->get_active_text() + "\" ADD USER \"" + user + "\"";
     const bool test = DbUtils::query_execute_string(strQuery);
     if(!test)
-      std::cerr << "Dialog_UsersList::on_button_user_add(): ALTER GROUP failed." << std::endl;
+      std::cerr << G_STRFUNC << ": ALTER GROUP failed." << std::endl;
 
     //Remove any user rights, so that all rights come from the user's presence in the group:
     Document::type_listTableInfo table_list = get_document()->get_tables();
@@ -215,7 +215,7 @@ void Dialog_UsersList::on_button_user_add()
       const Glib::ustring strQuery = "REVOKE ALL PRIVILEGES ON \"" + (*iter)->get_name() + "\" FROM \"" + user + "\"";
       const bool test = DbUtils::query_execute_string(strQuery);
       if(!test)
-        std::cerr << "Dialog_UsersList::on_button_user_add(): REVOKE failed." << std::endl;
+        std::cerr << G_STRFUNC << ": REVOKE failed." << std::endl;
     }
 
     fill_list();
@@ -322,7 +322,7 @@ void Dialog_UsersList::on_button_user_edit()
         const Glib::ustring strQuery = "ALTER USER \"" + user + "\" PASSWORD '" + password + "'" ; //TODO: Escape the password.
         const bool test = DbUtils::query_execute_string(strQuery);
         if(!test)
-          std::cerr << "Dialog_UsersList::on_button_user_edit(): ALTER USER failed." << std::endl;
+          std::cerr << G_STRFUNC << ": ALTER USER failed." << std::endl;
 
         //Change the password in the current connection, if this is the current user.
         ConnectionPool* connection_pool = ConnectionPool::get_instance();
diff --git a/glom/navigation/box_tables.cc b/glom/navigation/box_tables.cc
index ea57deb..e5d6077 100644
--- a/glom/navigation/box_tables.cc
+++ b/glom/navigation/box_tables.cc
@@ -72,7 +72,7 @@ void Box_Tables::fill_table_row(const Gtk::TreeModel::iterator& iter, const shar
 {
   if(!table_info)
   {
-    std::cerr << "Box_Tables::fill_table_row(): table_info was null." << std::endl;
+    std::cerr << G_STRFUNC << ": table_info was null." << std::endl;
     return;
   }
   
@@ -86,13 +86,13 @@ void Box_Tables::fill_table_row(const Gtk::TreeModel::iterator& iter, const shar
 
     if(developer_mode)
     {
-      //std::cout << "Box_Tables::fill_table_row(): dev title=" << table_info->get_title() << std::endl;
+      //std::cout << "debug: " << G_STRFUNC << ": dev title=" << table_info->get_title() << std::endl;
       m_AddDel.set_value(iter, m_colTitle, table_info->get_title());
       m_AddDel.set_value(iter, m_colTitleSingular, table_info->get_title_singular());
     }
     else
     {
-      //std::cout << "Box_Tables::fill_table_row(): op get_title_or_name=" << table_info->get_title_or_name() << std::endl;
+      //std::cout << "debug: " << G_STRFUNC << ": op get_title_or_name=" << table_info->get_title_or_name() << std::endl;
       m_AddDel.set_value(iter, m_colTitle, table_info->get_title_or_name());
     }
 
@@ -172,7 +172,7 @@ bool Box_Tables::fill_from_database()
       {
         table_info = *iterFind;
 
-        //std::cout << "fill_from_database(): name=" << (*iterFind)->get_name() << ", table_info->get_title()=" << (*iterFind)->get_title() << std::endl;
+        //std::cout << "debug: " << G_STRFUNC << ": name=" << (*iterFind)->get_name() << ", table_info->get_title()=" << (*iterFind)->get_title() << std::endl;
       }
       else
       {
@@ -309,7 +309,7 @@ void Box_Tables::on_adddel_Delete(const Gtk::TreeModel::iterator& rowStart, cons
           {
             const bool test = DbUtils::query_execute_string( "DROP TABLE \"" + table_name + "\"");
             if(!test)
-              std::cerr << "Box_Tables::on_adddel_Delete(): DROP TABLE failed." << std::endl;
+              std::cerr << G_STRFUNC << ": DROP TABLE failed." << std::endl;
             else
             {
               get_document()->remove_table(table_name); //Forget about it in the document too.
@@ -453,7 +453,7 @@ void Box_Tables::save_to_document()
           table_info->m_hidden = m_AddDel.get_value_as_bool(iter, m_colHidden);
           table_info->set_title( m_AddDel.get_value(iter, m_colTitle) ); //TODO_Translations: Store the TableInfo in the TreeView.
           table_info->set_title_singular( m_AddDel.get_value(iter, m_colTitleSingular) ); //TODO_Translations: Store the TableInfo in the TreeView.
-          //std::cout << "save_to_document(): title=" << table_info->get_title() << std::endl;
+          //std::cout << "debug: " << G_STRFUNC << ": title=" << table_info->get_title() << std::endl;
           table_info->m_default = m_AddDel.get_value_as_bool(iter, m_colDefault);
 
           listTables.push_back(table_info);
diff --git a/glom/navigation/maemo/pickerbutton_table.cc b/glom/navigation/maemo/pickerbutton_table.cc
index d19e62e..4404a41 100644
--- a/glom/navigation/maemo/pickerbutton_table.cc
+++ b/glom/navigation/maemo/pickerbutton_table.cc
@@ -98,7 +98,7 @@ void PickerButton_Table::set_table_name(const Glib::ustring& table_name)
   }
 
   //Not found, so mark it as blank:
-  //std::cerr << "PickerButton_Table::set_table_name(): table_name not found in list: " << table_name << std::endl;
+  //std::cerr << G_STRFUNC << ": table_name not found in list: " << table_name << std::endl;
   //TODO: unset_active();
 }
 
diff --git a/glom/print_layout/canvas_layout_item.cc b/glom/print_layout/canvas_layout_item.cc
index 19cb173..ecc4dbc 100644
--- a/glom/print_layout/canvas_layout_item.cc
+++ b/glom/print_layout/canvas_layout_item.cc
@@ -132,7 +132,7 @@ void CanvasLayoutItem::set_layout_item(const sharedptr<LayoutItem>& layout_item)
   m_layout_item = layout_item;
 
   if(!m_layout_item)
-    std::cerr << "CanvasLayoutItem::set_layout_item(): item was NULL." << std::endl;
+    std::cerr << G_STRFUNC << ": item was NULL." << std::endl;
 
   Glib::RefPtr<CanvasItemMovable> child_item = create_canvas_item_for_layout_item(m_layout_item);
 
@@ -150,7 +150,7 @@ void CanvasLayoutItem::set_layout_item(const sharedptr<LayoutItem>& layout_item)
 
     set_xy(x, y);
     set_width_height(width, height);
-    //std::cout << "CanvasLayoutItem::set_layout_item(): item x=" << x << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": item x=" << x << std::endl;
 
     set_child(child_item);
   }
@@ -331,11 +331,11 @@ Glib::RefPtr<CanvasItemMovable> CanvasLayoutItem::create_canvas_item_for_layout_
           }
           else if(layout_item)
           {
-            std::cerr << "CanvasLayoutItem::set_layout_item(): Unhandled LayoutItem type. part type=" << layout_item->get_part_type_name() << std::endl;
+            std::cerr << G_STRFUNC << ": Unhandled LayoutItem type. part type=" << layout_item->get_part_type_name() << std::endl;
           }
           else
           {
-            std::cerr << "CanvasLayoutItem::set_layout_item(): NULL LayoutItem type." << std::endl;
+            std::cerr << G_STRFUNC << ": NULL LayoutItem type." << std::endl;
           }
         }
       }
@@ -356,7 +356,7 @@ Glib::RefPtr<CanvasItemMovable> CanvasLayoutItem::create_canvas_item_for_layout_
     double height = 0;
     layout_item->get_print_layout_position(x, y, width, height);
     child->set_width_height(width, height);
-    //std::cout << "CanvasLayoutItem::set_layout_item(): item x=" << x << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": item x=" << x << std::endl;
   }
 
   //Scale images.
@@ -427,7 +427,7 @@ void CanvasLayoutItem::set_db_data(const Gnome::Gda::Value& value)
       break;
     }
     default:
-      std::cerr << "CanvasLayoutItem::set_db_data(): unhandled field type." << std::endl;
+      std::cerr << G_STRFUNC << ": unhandled field type." << std::endl;
   }
         
 }
diff --git a/glom/print_layout/canvas_print_layout.cc b/glom/print_layout/canvas_print_layout.cc
index d5391c9..db1d4c1 100644
--- a/glom/print_layout/canvas_print_layout.cc
+++ b/glom/print_layout/canvas_print_layout.cc
@@ -436,7 +436,7 @@ void Canvas_PrintLayout::update_layout_position_from_canvas(const sharedptr<Layo
   double x = 0;
   double y = 0;
   canvas_item->get_xy(x, y);
-  //std::cout << "Canvas_PrintLayout::update_layout_position_from_canvas(): x=" << x << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": x=" << x << std::endl;
 
   double width = 0;
   double height = 0;
@@ -469,7 +469,7 @@ void Canvas_PrintLayout::set_page_setup(const Glib::RefPtr<Gtk::PageSetup>& page
 
   const Gtk::Unit units = property_units();
 
-  //std::cout << "Canvas_PrintLayout::set_page_setup(): width=" << paper_size.get_width(units) << ", height=" paper_size.get_height(units) << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": width=" << paper_size.get_width(units) << ", height=" paper_size.get_height(units) << std::endl;
 
   if(m_page_setup->get_orientation() == Gtk::PAGE_ORIENTATION_PORTRAIT) //TODO: Handle the reverse orientations too?
   {
@@ -482,7 +482,7 @@ void Canvas_PrintLayout::set_page_setup(const Glib::RefPtr<Gtk::PageSetup>& page
     bounds.set_x2( paper_size.get_height(units) );
   }
 
-  //std::cout << "Canvas_PrintLayout::set_page_setup(): portrait page width=" << paper_size.get_width(units) << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": portrait page width=" << paper_size.get_width(units) << std::endl;
 
   set_bounds(bounds);
 
@@ -706,7 +706,7 @@ void Canvas_PrintLayout::fill_with_data_portal(const Glib::RefPtr<CanvasLayoutIt
       //Glib::RefPtr<Goocanvas::Item> canvas_child = base_item->get_cell_child(row, col); //TODO: Add this to GooCanvas::Table.
       Glib::RefPtr<Goocanvas::Item> canvas_child = get_canvas_table_cell_child(canvas_table, row, col); //TODO: Add this to GooCanvas::Table.
       if(!canvas_child)
-        std::cerr << "Canvas_PrintLayout::fill_with_data_portal(): canvas_child is NULL." << std::endl;
+        std::cerr << G_STRFUNC << ": canvas_child is NULL." << std::endl;
 
       if(iter_child_layout_items == child_layout_items.end())
         continue;
@@ -751,7 +751,7 @@ void Canvas_PrintLayout::set_canvas_item_field_value(const Glib::RefPtr<Goocanva
     Glib::RefPtr<CanvasTextMovable> canvas_text = Glib::RefPtr<CanvasTextMovable>::cast_dynamic(canvas_item);
     if(!canvas_text)
     {
-      std::cerr << "Canvas_PrintLayout::set_canvas_item_field_value(): The canvas item is not of the expected type. Instead it is of type." << std::endl;
+      std::cerr << G_STRFUNC << ": The canvas item is not of the expected type. Instead it is of type." << std::endl;
       return;
     }
 
@@ -834,7 +834,7 @@ Base_DB::type_vecLayoutFields Canvas_PrintLayout::get_portal_fields_to_show(cons
 {
   const Document* document = get_document();
   if(!document)
-    std::cerr << "Canvas_PrintLayout::get_portal_fields_to_show(): document is NULL." << std::endl;
+    std::cerr << G_STRFUNC << ": document is NULL." << std::endl;
 
   if(document && portal)
   {
diff --git a/glom/python_embed/glom_python.cc b/glom/python_embed/glom_python.cc
index 6ec9cb8..9116af2 100644
--- a/glom/python_embed/glom_python.cc
+++ b/glom/python_embed/glom_python.cc
@@ -227,7 +227,7 @@ static boost::python::object glom_python_call(Field::glom_field_type result_type
   //boost::python::dict pDict = pMain.attr("__dict__"); //TODO: Does boost::python have an equivalent for PyModule_GetDict()?
   if(!pDict)
   {
-     std::cerr << "glom_evaluate_python_function_implementation(): pDict is null" << std::endl;
+     std::cerr << G_STRFUNC << ": pDict is null" << std::endl;
      error_message = get_traceback();
      return boost::python::object();
   }
@@ -301,14 +301,14 @@ static boost::python::object glom_python_call(Field::glom_field_type result_type
   }
   catch(const boost::python::error_already_set& ex)
   {
-    std::cerr << "glom_evaluate_python_function_implementation():  boost::python::exec() threw error_already_set when using text= " << std::endl << func_def << std::endl;
+    std::cerr << G_STRFUNC << ":  boost::python::exec() threw error_already_set when using text= " << std::endl << func_def << std::endl;
     error_message = get_traceback();
     return boost::python::object();
   }
 
   if(!pyValue.ptr())
   {
-    std::cerr << "glom_evaluate_python_function_implementation(): boost::python::exec failed." << std::endl;
+    std::cerr << G_STRFUNC << ": boost::python::exec failed." << std::endl;
     error_message = get_traceback();
     return boost::python::object();
   }
@@ -321,14 +321,14 @@ static boost::python::object glom_python_call(Field::glom_field_type result_type
   }
   catch(const boost::python::error_already_set& ex)
   {
-    std::cerr << "glom_evaluate_python_function_implementation():  pDict[func_name] threw error_already_set when func_name= " << std::endl << func_name << std::endl;
+    std::cerr << G_STRFUNC << ":  pDict[func_name] threw error_already_set when func_name= " << std::endl << func_name << std::endl;
     error_message = get_traceback();
     return boost::python::object();
   }
 
   if(!pFunc.ptr())
   {
-    std::cerr << "glom_evaluate_python_function_implementation(): pDict[func_name] failed." << std::endl;
+    std::cerr << G_STRFUNC << ": pDict[func_name] failed." << std::endl;
     HandlePythonError();
     return boost::python::object();
   }
@@ -466,7 +466,7 @@ Gnome::Gda::Value glom_evaluate_python_function_implementation(Field::glom_field
     //Make sure that the value is of the expected Gda type:
     //TODO_Performance:
     valueResult = Glom::Conversions::convert_value(valueResult, result_type);
-    //std::cout << "DEBUG: glom_evaluate_python_function_implementation(): valueResult Gda type=" << g_type_name(valueResult.get_value_type()) << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": valueResult Gda type=" << g_type_name(valueResult.get_value_type()) << std::endl;
     g_value_unset(&value);
   }
   else
@@ -479,7 +479,7 @@ Gnome::Gda::Value glom_evaluate_python_function_implementation(Field::glom_field
     {
       //The result should be an appropriate empty value for this field type:
       valueResult = Conversions::get_empty_value(result_type);
-      //std::cout << "DEBUG: glom_evaluate_python_function_implementation(): empty value Gda type=" << g_type_name(valueResult.get_value_type()) << std::endl;
+      //std::cout << "debug: " << G_STRFUNC << ": empty value Gda type=" << g_type_name(valueResult.get_value_type()) << std::endl;
     }
     else
     {
@@ -503,7 +503,7 @@ Gnome::Gda::Value glom_evaluate_python_function_implementation(Field::glom_field
       {
         bool success = false;
         valueResult = Conversions::parse_value(result_type, pchResult, success, true /* iso_format */);
-        std::cout << "DEBUG: glom_evaluate_python_function_implementation(): parsed value Gda type=" << g_type_name(valueResult.get_value_type()) << std::endl;
+        std::cout << "debug: " << G_STRFUNC << ": parsed value Gda type=" << g_type_name(valueResult.get_value_type()) << std::endl;
       }
       else
         HandlePythonError();
diff --git a/glom/utility_widgets/adddel/adddel.cc b/glom/utility_widgets/adddel/adddel.cc
index 20f7e74..9152dfb 100644
--- a/glom/utility_widgets/adddel/adddel.cc
+++ b/glom/utility_widgets/adddel/adddel.cc
@@ -758,7 +758,7 @@ void AddDel::construct_specified_columns()
     }
     else
     {
-      std::cerr << "debug: AddDel::construct_specified_columns(): Leaking a Gtk::TreeModelColumn<>." << std::endl;
+      std::cerr << G_STRFUNC << ": Leaking a Gtk::TreeModelColumn<>." << std::endl;
     }
     
     ++model_column_index;
diff --git a/glom/utility_widgets/canvas/canvas_group_resizable.cc b/glom/utility_widgets/canvas/canvas_group_resizable.cc
index 18a95c0..2527413 100644
--- a/glom/utility_widgets/canvas/canvas_group_resizable.cc
+++ b/glom/utility_widgets/canvas/canvas_group_resizable.cc
@@ -182,12 +182,12 @@ void CanvasGroupResizable::position_rect_manipulators()
   double child_x = 0;
   double child_y = 0;
   get_xy(child_x, child_y);
-  //std::cout << "  CanvasGroupResizable::position_manipulators(): child x=" << child_x << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": child x=" << child_x << std::endl;
 
   double child_width = 0;
   double child_height = 0;
   get_width_height(child_width, child_height);
-  //std::cout << "  CanvasGroupResizable::position_manipulators(): child width=" << child_width << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": child width=" << child_width << std::endl;
 
 
   //Show the size of this item (not always the same as the child size):
@@ -530,7 +530,7 @@ void CanvasGroupResizable::on_manipulator_edge_moved(Manipulators manipulator_id
   Glib::RefPtr<CanvasItemMovable> manipulator_base = get_manipulator(manipulator_id);
   Glib::RefPtr<CanvasLineMovable> manipulator = Glib::RefPtr<CanvasLineMovable>::cast_dynamic(manipulator_base);
   
-  //std::cout << "CanvasGroupResizable::on_manipulator_edge_moved(): manipulator=" << manipulator_id << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": manipulator=" << manipulator_id << std::endl;
 
   Goocanvas::Points points = manipulator->property_points();
   double x1 = 0;
@@ -729,7 +729,7 @@ void CanvasGroupResizable::get_xy(double& x, double& y) const
 
 void CanvasGroupResizable::set_xy(double x, double y)
 {
-  //std::cout << "CanvasGroupResizable::set_xy(): " << x << ", " << y << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": " << x << ", " << y << std::endl;
   if(m_child)
     m_child->set_xy(x, y);
   
diff --git a/glom/utility_widgets/canvas/canvas_image_movable.cc b/glom/utility_widgets/canvas/canvas_image_movable.cc
index c9da789..f8bc8ea 100644
--- a/glom/utility_widgets/canvas/canvas_image_movable.cc
+++ b/glom/utility_widgets/canvas/canvas_image_movable.cc
@@ -173,7 +173,7 @@ void CanvasImageMovable::scale_to_size()
   double width = 0;
   double height = 0;
   get_width_height(width, height);
-  //std::cout << "CanvasImageMovable::set_image(): width=" << width << ", height=" << height << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": width=" << width << ", height=" << height << std::endl;
   
   if(width && height)
   {
diff --git a/glom/utility_widgets/canvas/canvas_item_movable.cc b/glom/utility_widgets/canvas/canvas_item_movable.cc
index c522a03..fd3008a 100644
--- a/glom/utility_widgets/canvas/canvas_item_movable.cc
+++ b/glom/utility_widgets/canvas/canvas_item_movable.cc
@@ -242,7 +242,7 @@ void CanvasItemMovable::snap_position(double& x, double& y) const
     m_grid->snap_position(x, y);
   //else
   //{
-  //  std::cout << "CanvasItemMovable::snap_position(): m_grid is NULL" << std::endl;
+  //  std::cout << "debug: " << G_STRFUNC << ": m_grid is NULL" << std::endl;
   //}
 }
 
diff --git a/glom/utility_widgets/canvas/canvas_line_movable.cc b/glom/utility_widgets/canvas/canvas_line_movable.cc
index 4add442..726d3cf 100644
--- a/glom/utility_widgets/canvas/canvas_line_movable.cc
+++ b/glom/utility_widgets/canvas/canvas_line_movable.cc
@@ -65,7 +65,7 @@ void CanvasLineMovable::get_width_height(double& width, double& height) const
   width = property_width();
   height = property_height();
 
-  //std::cout << "CanvasLineMovable::get_width_height(): width=" << width << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": width=" << width << std::endl;
 }
 
 void CanvasLineMovable::set_width_height(double width, double height)
@@ -73,7 +73,7 @@ void CanvasLineMovable::set_width_height(double width, double height)
   property_width() = width;
   property_height() = height;
 
-  //std::cout << "CanvasLineMovable::set_width_height(): end x=" << x1+width << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": end x=" << x1+width << std::endl;
 }
 
 Goocanvas::Canvas* CanvasLineMovable::get_parent_canvas_widget()
diff --git a/glom/utility_widgets/canvas/canvas_table_movable.cc b/glom/utility_widgets/canvas/canvas_table_movable.cc
index 2ee1077..a7b8a2a 100644
--- a/glom/utility_widgets/canvas/canvas_table_movable.cc
+++ b/glom/utility_widgets/canvas/canvas_table_movable.cc
@@ -74,7 +74,7 @@ void CanvasTableMovable::set_width_height(double width, double height)
 {
   if(width == -1)
   {
-    std::cout << "CanvasTableMovable::set_width_height(): width is -1" << std::endl;
+    std::cout << "debug: " << G_STRFUNC << ": width is -1" << std::endl;
   }
   property_width() = width;
   property_height() = height;
diff --git a/glom/utility_widgets/db_adddel/db_adddel.cc b/glom/utility_widgets/db_adddel/db_adddel.cc
index 424605a..c775f97 100644
--- a/glom/utility_widgets/db_adddel/db_adddel.cc
+++ b/glom/utility_widgets/db_adddel/db_adddel.cc
@@ -178,7 +178,7 @@ void DbAddDel::do_user_requested_edit()
     signal_user_requested_edit()(iter);
   }
   else
-    std::cerr << "DbAddDel::do_user_requested_edit(): No item was selected." << std::endl;
+    std::cerr << G_STRFUNC << ": No item was selected." << std::endl;
 }
 
 #ifndef GLOM_ENABLE_MAEMO
@@ -938,7 +938,7 @@ void DbAddDel::construct_specified_columns()
 
   if(m_ColumnTypes.empty())
   {
-    //std::cout << "debug: DbAddDel::construct_specified_columns(): showing hint model: m_find_mode=" << m_find_mode << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": showing hint model: m_find_mode=" << m_find_mode << std::endl;
 
     m_refListStore.reset();
     if(m_table_name.empty())
@@ -1875,7 +1875,7 @@ void DbAddDel::on_treeview_column_resized(int model_column_index, DbTreeViewColu
   DbAddDelColumnInfo& column_info = m_ColumnTypes[model_column_index];
 
   const int width = view_column->get_width();
-  //std::cout << "  DbAddDel::on_treeview_column_resized(): width=" << width << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": width=" << width << std::endl;
 
   if(width == -1) //Means automatic.
     return;
@@ -2250,7 +2250,7 @@ void DbAddDel::treeviewcolumn_on_cell_data(Gtk::CellRenderer* renderer, const Gt
 
       /*
       GType debug_type = value.get_value_type();
-      std::cout << "  debug: DbAddDel::treeviewcolumn_on_cell_data(): GdaValue from TreeModel::get_value(): GType=" << debug_type << std::endl;
+      std::cout << "debug: " << G_STRFUNC << ": GType=" << debug_type << std::endl;
       if(debug_type)
          std::cout << "    GType name=\"" << g_type_name(debug_type) << "\"" << std::endl; 
       */
@@ -2290,7 +2290,7 @@ void DbAddDel::treeviewcolumn_on_cell_data(Gtk::CellRenderer* renderer, const Gt
           Gtk::CellRendererText* pDerived = dynamic_cast<Gtk::CellRendererText*>(renderer);
           if(pDerived)
           {
-            //std::cout << "  debug: DbAddDel::treeviewcolumn_on_cell_data(): field name=" << field->get_name() << ", glom type=" << field->get_glom_type() << std::endl;
+            //std::cout << "debug: " << G_STRFUNC << ": field name=" << field->get_name() << ", glom type=" << field->get_glom_type() << std::endl;
             const Glib::ustring text = Conversions::get_text_for_gda_value(field->get_glom_type(), value, field->get_formatting_used().m_numeric_format);
             //g_assert(text != "NULL");
             g_object_set(pDerived->gobj(), "text", text.c_str(), (gpointer)0);
@@ -2431,7 +2431,7 @@ bool DbAddDel::start_new_record()
   }
   else
   {
-    std::cout << "start_new_record(): no editable rows." << std::endl;
+    std::cout << "debug: " << G_STRFUNC << ": no editable rows." << std::endl;
     //The only keys are non-editable, so just add a row:
     select_item(iter); //without start_editing.
     //g_warning("start_new_record(): index_field_to_edit does not exist: %d", index_field_to_edit);
@@ -2443,7 +2443,7 @@ bool DbAddDel::start_new_record()
 void DbAddDel::user_changed(const Gtk::TreeModel::iterator& row, guint col)
 {
   const Gnome::Gda::Value parent_primary_key_value = get_value_key(row);
-  //std::cout << "DbAddDel::user_changed(): parent_primary_key_value=" << parent_primary_key_value.to_string() << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": parent_primary_key_value=" << parent_primary_key_value.to_string() << std::endl;
  
   sharedptr<const LayoutItem_Field> layout_field = get_column_field(col);
 
@@ -2509,7 +2509,7 @@ void DbAddDel::user_changed(const Gtk::TreeModel::iterator& row, guint col)
 
       //Update the field in the record (the record with this primary key):
       const Gnome::Gda::Value field_value = get_value(row, layout_field);
-      //std::cout << "Box_Data_List::on_adddel_user_changed(): field_value = " << field_value.to_string() << std::endl;
+      //std::cout << "debug: " << G_STRFUNC << ": field_value = " << field_value.to_string() << std::endl;
       //const sharedptr<const Field>& field = layout_field->m_field;
       //const Glib::ustring strFieldName = layout_field->get_name();
 
diff --git a/glom/utility_widgets/db_adddel/glom_db_treemodel.cc b/glom/utility_widgets/db_adddel/glom_db_treemodel.cc
index 2a766e8..5c9e15e 100644
--- a/glom/utility_widgets/db_adddel/glom_db_treemodel.cc
+++ b/glom/utility_widgets/db_adddel/glom_db_treemodel.cc
@@ -42,7 +42,7 @@ DbTreeModelRow::DbTreeModelRow()
 
 void DbTreeModelRow::fill_values_if_necessary(DbTreeModel& model, int row)
 {
-  //std::cout << "DbTreeModelRow::fill_values_if_necessary(): row=" << row << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": row=" << row << std::endl;
   //if(row == 1000)
   //{
   //  std::cout << "1000" << std::endl;
@@ -50,11 +50,11 @@ void DbTreeModelRow::fill_values_if_necessary(DbTreeModel& model, int row)
 
   if(m_values_retrieved)
   {
-     //std::cout << "debug: DbTreeModelRow::fill_values_if_necessary(): already retrieved" << std::endl;
+     //std::cout << "debug: " << G_STRFUNC << ": already retrieved" << std::endl;
   }
   else
   {
-    //std::cout << "debug: DbTreeModelRow::fill_values_if_necessary(): retrieving for row=" << row << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": retrieving for row=" << row << std::endl;
 
     if((row < (int)model.m_data_model_rows_count) && model.m_gda_datamodel)
     {
@@ -73,7 +73,7 @@ void DbTreeModelRow::fill_values_if_necessary(DbTreeModel& model, int row)
           else
           {
             // This is quite possible, for example for unset dates. jhs
-            //std::cerr << "DbTreeModelRow::fill_values_if_necessary(): NULL Gnome::Gda::Holder for field=" << i << std::endl;
+            //std::cerr << G_STRFUNC << ": NULL Gnome::Gda::Holder for field=" << i << std::endl;
           }
 
           //std::cout << "  debug: col=" << i << ", GType=" << m_db_values[i].get_value_type() << ", string=" << m_db_values[i].to_string() << std::endl;
@@ -83,7 +83,7 @@ void DbTreeModelRow::fill_values_if_necessary(DbTreeModel& model, int row)
         if(holder)
           m_key = holder->get_value();  //TODO_gda: Why not just use get_value_at()?
         else
-          std::cerr << "DbTreeModelRow::fill_values_if_necessary(): NULL Gnome::Gda::Holder for key field" << std::endl;
+          std::cerr << G_STRFUNC << ": NULL Gnome::Gda::Holder for key field" << std::endl;
 
         m_extra = false;
         m_removed = false;
@@ -94,7 +94,7 @@ void DbTreeModelRow::fill_values_if_necessary(DbTreeModel& model, int row)
       //g_warning("DbTreeModelRow::fill_values_if_necessary(): Non-db row.");
       if(m_extra)
       {
-        //std::cout << "  debug: DbTreeModelRow::fill_values_if_necessary(): using default value" << std::endl;
+        //std::cout << "debug: " << G_STRFUNC << ": using default value" << std::endl;
 
         //It is an extra row, added with append().
       }
@@ -136,7 +136,7 @@ void DbTreeModelRow::set_value(DbTreeModel& model, int column, int row, const Db
   const GType debug_type_expected = gdacolumn->get_g_type();
   if(debug_type_in != debug_type_expected)
   {
-    std::cout << "debug: DbTreeModelRow::set_value(): expected GType=" << debug_type_expected << ", but received GType=" << debug_type_in << std::endl;
+    std::cout << "debug: " << G_STRFUNC << ": expected GType=" << debug_type_expected << ", but received GType=" << debug_type_in << std::endl;
     if(debug_type_expected)
       std::cout << "  expected GType name=\"" << g_type_name(debug_type_expected) << "\"" << std::endl;
 
@@ -158,7 +158,7 @@ DbTreeModelRow::DbValue DbTreeModelRow::get_value(DbTreeModel& model, int column
     return iterFind->second;
   else
   {
-    std::cout << "debug: DbTreeModelRow::get_value(): column not found." << std::endl;
+    std::cout << "debug: " << G_STRFUNC << ": column not found." << std::endl;
     return DbValue();
   }
 }
@@ -256,12 +256,12 @@ bool DbTreeModel::refresh_from_database(const FoundSet& found_set)
   }
 
   if(m_found_set.m_table_name.empty())
-    std::cerr << "DEBUG: refresh_from_database(): found_set.m_table_name is empty." << std::endl;
+    std::cerr << G_STRFUNC << ": found_set.m_table_name is empty." << std::endl;
 
   if(m_connection && !m_found_set.m_table_name.empty() && m_get_records)
   {
     Glib::RefPtr<Gnome::Gda::SqlBuilder> sql_query = Utils::build_sql_select_with_where_clause(m_found_set.m_table_name, m_column_fields, m_found_set.m_where_clause, m_found_set.m_extra_join, m_found_set.m_sort_clause);
-    //std::cout << "  Debug: DbTreeModel::refresh_from_database():  " << sql_query << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ":  " << sql_query << std::endl;
 
     m_gda_datamodel = DbUtils::query_execute_select(sql_query, true /* use_cursor */);
 
@@ -270,7 +270,7 @@ bool DbTreeModel::refresh_from_database(const FoundSet& found_set)
       m_data_model_rows_count = 0;
       m_data_model_columns_count = m_columns_count;
 
-      std::cerr << "DbTreeModel::refresh_from_database(): error executing SQL." << std::endl;
+      std::cerr << G_STRFUNC << ": error executing SQL." << std::endl;
       ConnectionPool::handle_error_cerr_only();
       return false; //No records were found.
     }
@@ -294,7 +294,7 @@ bool DbTreeModel::refresh_from_database(const FoundSet& found_set)
       const int count = Base_DB::count_rows_returned_by(sql_query_without_sort);
       if(count < 0)
       {
-        std::cerr << "DbTreeModel::refresh_from_database(): count is < 0" << std::endl;
+        std::cerr << G_STRFUNC << ": count is < 0" << std::endl;
         m_data_model_rows_count = 0;
       }
       else
@@ -336,7 +336,7 @@ GType DbTreeModel::get_column_type_vfunc(int index) const
 
 void DbTreeModel::get_value_vfunc(const TreeModel::iterator& iter, int column, Glib::ValueBase& value) const
 {
-  //std::cout << "debug: DbTreeModel::get_value_vfunc(): column=" << column << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": column=" << column << std::endl;
 
   if(check_treeiter_validity(iter))
   {
@@ -348,7 +348,7 @@ void DbTreeModel::get_value_vfunc(const TreeModel::iterator& iter, int column, G
 
       //Get the correct ValueType from the Gtk::TreeModel::Column's type, so we don't have to repeat it here:
       //(This would be a custom boxed type for our Gda::Value (stored inside the TreeModel's Glib::Value just as an int or char* would be stored in it.)
-      //std::cout << "  debug: DbTreeModel::get_value_vfunc(): column=" << column << ", value type=" << g_type_name(typeModelColumn::ValueType::value_type()) << std::endl;
+      //std::cout << "debug: " << G_STRFUNC << ": column=" << column << ", value type=" << g_type_name(typeModelColumn::ValueType::value_type()) << std::endl;
 
       typeModelColumn::ValueType value_specific;
       value_specific.init( typeModelColumn::ValueType::value_type() );  //TODO: Is there any way to avoid this step?
@@ -407,7 +407,7 @@ void DbTreeModel::get_value_vfunc(const TreeModel::iterator& iter, int column, G
             /*
             if((result.get_value_type() != 0) && (result.get_value_type() != gtype_expected))
             {
-              std::cout << "  debug: DbTreeModel::get_value_vfunc(): column_sql=" << column_sql << ", describe_column() returned GType: " << gtype_expected << " but get_value() returned GType: " << result.get_value_type() << std::endl;
+              std::cout << "debug: " << G_STRFUNC << ": column_sql=" << column_sql << ", describe_column() returned GType: " << gtype_expected << " but get_value() returned GType: " << result.get_value_type() << std::endl;
             }
             */
           }
@@ -418,7 +418,7 @@ void DbTreeModel::get_value_vfunc(const TreeModel::iterator& iter, int column, G
 
         /*
         GType debug_type = result.get_value_type();
-        std::cout << "  debug: DbTreeModel::get_value_vfunc(): result value type: GType=" << debug_type << std::endl;
+        std::cout << "debug: " << G_STRFUNC << ": result value type: GType=" << debug_type << std::endl;
         if(debug_type)
           std::cout << "    GType name=\"" << g_type_name(debug_type) << "\"" << std::endl;
         */
@@ -437,7 +437,7 @@ bool DbTreeModel::iter_next_vfunc(const iterator& iter, iterator& iter_next) con
   {
     //Get the current row:
     type_datamodel_row_index datamodel_row = get_datamodel_row_index_from_tree_row_iter(iter);
-    //std::cout << "DbTreeModel::iter_next_vfunc():" << datamodel_row << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ":" << datamodel_row << std::endl;
 
     //Make the iter_next GtkTreeIter represent the next row:
     ++datamodel_row;
@@ -475,7 +475,7 @@ int DbTreeModel::iter_n_children_vfunc(const iterator& iter) const
 
 int DbTreeModel::iter_n_root_children_vfunc() const
 {
-  //std::cout << "iter_n_root_children_vfunc(): returning: " << get_internal_rows_count() - m_count_removed_rows + 1 << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": returning: " << get_internal_rows_count() - m_count_removed_rows + 1 << std::endl;
   return get_internal_rows_count() - m_count_removed_rows;
 }
 
diff --git a/glom/utility_widgets/flowtable_dnd.cc b/glom/utility_widgets/flowtable_dnd.cc
index 1889e2d..dc10f86 100644
--- a/glom/utility_widgets/flowtable_dnd.cc
+++ b/glom/utility_widgets/flowtable_dnd.cc
@@ -151,26 +151,26 @@ bool FlowTableDnd::on_drag_motion(const Glib::RefPtr<Gdk::DragContext>& /* drag_
 void FlowTableDnd::on_dnd_add_layout_item_by_type(int /* item_type */, Gtk::Widget* /* above */)
 {
   //This is not pure virtual, so we can easily use this base class in unit tests.
-  std::cerr << "FlowTableDnd::on_dnd_add_layout_item_by_type(): Not implemented. Derived classes should implement this." << std::endl;
+  std::cerr << G_STRFUNC << ": Not implemented. Derived classes should implement this." << std::endl;
 }
 
 void FlowTableDnd::on_dnd_add_layout_item(LayoutWidgetBase* /* above */, const sharedptr<LayoutItem>& /* item */)
 {
   //This is not pure virtual, so we can easily use this base class in unit tests.
-  std::cerr << "FlowTableDnd::on_dnd_add_layout_item(): Not implemented. Derived classes should implement this." << std::endl;
+  std::cerr << G_STRFUNC << ": Not implemented. Derived classes should implement this." << std::endl;
 
 }
 
 void FlowTableDnd::on_dnd_add_placeholder(Gtk::Widget* /* above */)
 {
   //This is not pure virtual, so we can easily use this base class in unit tests.
-  std::cerr << "FlowTableDnd::on_dnd_add_placeholder(): Not implemented. Derived classes should implement this." << std::endl;
+  std::cerr << G_STRFUNC << ": Not implemented. Derived classes should implement this." << std::endl;
 }
 
 void FlowTableDnd::on_dnd_remove_placeholder()
 {
   //This is not pure virtual, so we can easily use this base class in unit tests.
-  std::cerr << "FlowTableDnd::on_dnd_remove_placeholder(): Not implemented. Derived classes should implement this." << std::endl;
+  std::cerr << G_STRFUNC << ": Not implemented. Derived classes should implement this." << std::endl;
 }
 
 
diff --git a/glom/utility_widgets/imageglom.cc b/glom/utility_widgets/imageglom.cc
index 78bed64..1b11e6b 100644
--- a/glom/utility_widgets/imageglom.cc
+++ b/glom/utility_widgets/imageglom.cc
@@ -257,7 +257,7 @@ Gnome::Gda::Value ImageGlom::get_value() const
     }
     catch(const Glib::Exception& ex)
     {
-      std::cerr << "ImageGlom::get_value(): " << ex.what() << std::endl;
+      std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
     }
   }
 
diff --git a/glom/utility_widgets/layoutwidgetutils.cc b/glom/utility_widgets/layoutwidgetutils.cc
index a2b7e7a..eb9f5eb 100644
--- a/glom/utility_widgets/layoutwidgetutils.cc
+++ b/glom/utility_widgets/layoutwidgetutils.cc
@@ -118,7 +118,7 @@ void LayoutWidgetUtils::on_menu_delete_activate()
 void LayoutWidgetUtils::on_menu_properties_activate()
 {
   //This is not pure virtual, so we can easily use this base class in unit tests.
-  std::cerr << "LayoutWidgetUtils::on_menu_properties_activate(): Not imlemented. Derived classes should override this." << std::endl;
+  std::cerr << G_STRFUNC << ": Not imlemented. Derived classes should override this." << std::endl;
 }
 
 #endif // !GLOM_ENABLE_CLIENT_ONLY
diff --git a/glom/xsl_utils.cc b/glom/xsl_utils.cc
index 19ceb78..4dec9d6 100644
--- a/glom/xsl_utils.cc
+++ b/glom/xsl_utils.cc
@@ -129,7 +129,7 @@ void GlomXslUtils::transform_and_open(const xmlpp::Document& xml_document, const
   GError* gerror = 0;
   if(!gtk_show_uri(0 /* screen */, file->get_uri().c_str(), GDK_CURRENT_TIME, &gerror))
   {
-    std::cerr << "Error while calling gtk_show_uri(): " << gerror->message << std::endl;
+    std::cerr << G_STRFUNC << ": " << gerror->message << std::endl;
     g_error_free(gerror);
   }
 #endif //G_OS_WIN32
diff --git a/tests/import/test_parsing.cc b/tests/import/test_parsing.cc
index 480d1ea..52532e4 100644
--- a/tests/import/test_parsing.cc
+++ b/tests/import/test_parsing.cc
@@ -23,7 +23,7 @@ void on_line_scanned(const std::vector<Glib::ustring>& row, guint /*line_number*
       iter != row.end();
       ++iter)
   {
-    //std::cout << "  debug: on_line_scanned(): item=" << *iter << std::endl;
+    //std::cout << "debug: " << G_STRFUNC << ": item=" << *iter << std::endl;
 
     get_tokens_instance().push_back(*iter);
   }
diff --git a/tests/test_document_autosave.cc b/tests/test_document_autosave.cc
index 796ea3e..7502466 100644
--- a/tests/test_document_autosave.cc
+++ b/tests/test_document_autosave.cc
@@ -38,12 +38,12 @@ void cleanup()
     if(ex.code() == Gio::Error::NOT_FOUND)
       return;
 
-    std::cerr << "Exception from Gio::File::remove(): " << ex.what();
+    std::cerr << G_STRFUNC << ": " << ex.what();
     exit(EXIT_FAILURE);
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << "Exception from Gio::File::remove(): " << ex.what();
+    std::cerr << G_STRFUNC << ": " << ex.what();
     exit(EXIT_FAILURE);
   }
 }
diff --git a/tests/test_document_load.cc b/tests/test_document_load.cc
index c4fb752..ee20efa 100644
--- a/tests/test_document_load.cc
+++ b/tests/test_document_load.cc
@@ -56,7 +56,7 @@ int main()
   }
   catch(const Glib::ConvertError& ex)
   {
-    std::cerr << "Exception from Glib::filename_to_uri(): " << ex.what();
+    std::cerr << G_STRFUNC << ": " << ex.what();
     return EXIT_FAILURE;
   }
 
diff --git a/tests/test_python_execute_script.cc b/tests/test_python_execute_script.cc
index 8b0720a..1ee2cf4 100644
--- a/tests/test_python_execute_script.cc
+++ b/tests/test_python_execute_script.cc
@@ -11,13 +11,13 @@ bool result_started_new_record = false;
 
 static void on_script_ui_show_table_list(const Glib::ustring& table_name)
 {
-  //std::cout << "debug: on_script_ui_show_table_list(): table_name=" << table_name << std::endl;
+  //std::cout << "debug: " << G_STRFUNC << ": table_name=" << table_name << std::endl;
   result_table_name_list = table_name;
 }
 
 static void on_script_ui_show_table_details(const Glib::ustring& table_name, const Gnome::Gda::Value& primary_key_value)
 {
-  //std::cout << "debug: on_script_ui_show_table_details(): table_name=" << table_name
+  //std::cout << "debug: " << G_STRFUNC << ": table_name=" << table_name
   //  << ", primary_key_value=" << primary_key_value.to_string() << std::endl;
   result_table_name_details = table_name;
   result_primary_key_value_details = primary_key_value;
diff --git a/tests/test_selfhosting_new_from_example.cc b/tests/test_selfhosting_new_from_example.cc
index 0ccfeed..fc84fc7 100644
--- a/tests/test_selfhosting_new_from_example.cc
+++ b/tests/test_selfhosting_new_from_example.cc
@@ -122,7 +122,7 @@ int main()
   }
   catch(const Glib::ConvertError& ex)
   {
-    std::cerr << "Exception from Glib::filename_to_uri(): " << ex.what();
+    std::cerr << G_STRFUNC << ": " << ex.what();
     return EXIT_FAILURE;
   }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]