[glom] Use G_STRFUNC on all std::cerr messages.



commit 342cbc9db03efcf5115dab7d95b1fbf66ace5748
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Oct 29 10:05:43 2013 +0100

    Use G_STRFUNC on all std::cerr messages.
    
    I really need to invent some more concise way to do simple
    error checks and logging.

 glom/application.cc                                |    2 +-
 glom/appwindow.cc                                  |    6 +-
 glom/base_db.cc                                    |    4 +-
 glom/dialog_existing_or_new.cc                     |    6 +-
 glom/filechooser_export.cc                         |    2 +-
 glom/frame_glom.cc                                 |    4 +-
 glom/glade_utils.h                                 |    8 ++--
 glom/glom_create_from_example.cc                   |   20 +++++-----
 glom/glom_export_po.cc                             |    8 ++--
 glom/glom_export_po_all.cc                         |    6 +-
 glom/glom_import_po_all.cc                         |    6 +-
 glom/glom_test_connection.cc                       |    8 ++--
 glom/import_csv/csv_parser.cc                      |    2 +-
 glom/import_csv/dialog_import_csv.cc               |    2 +-
 glom/import_csv/dialog_import_csv_progress.cc      |    2 +-
 glom/libglom/connectionpool.cc                     |    2 +-
 glom/libglom/connectionpool_backends/mysql.cc      |   14 +++---
 glom/libglom/connectionpool_backends/mysql_self.cc |   20 +++++-----
 glom/libglom/connectionpool_backends/postgres.cc   |   18 ++++----
 .../connectionpool_backends/postgres_self.cc       |   26 ++++++------
 glom/libglom/connectionpool_backends/sqlite.cc     |    2 +-
 glom/libglom/data_structure/fieldtypes.cc          |    4 +-
 glom/libglom/data_structure/glomconversions.cc     |   16 ++++----
 glom/libglom/db_utils.cc                           |   10 ++--
 glom/libglom/document/bakery/document.cc           |    4 +-
 glom/libglom/document/bakery/document_xml.cc       |    2 +-
 glom/libglom/document/document.cc                  |    2 +-
 glom/libglom/privs.cc                              |    2 +-
 glom/libglom/python_embed/py_glom_record.cc        |    4 +-
 .../libglom/python_embed/pygdavalue_conversions.cc |    2 +-
 glom/libglom/spawn_with_feedback.cc                |    2 +-
 glom/libglom/test_sync.cc                          |    2 +-
 glom/libglom/translations_po.cc                    |    2 +-
 glom/libglom/utils.cc                              |    4 +-
 glom/main.cc                                       |    8 ++--
 glom/main_local_options.cc                         |    4 +-
 glom/mode_data/box_data.cc                         |    2 +-
 .../datawidget/combochoiceswithtreemodel.cc        |    2 +-
 glom/mode_data/datawidget/treemodel_db.cc          |    4 +-
 glom/mode_design/dialog_database_preferences.cc    |    2 +-
 glom/mode_design/iso_codes.cc                      |    6 +-
 .../layout/layout_item_dialogs/dialog_line.cc      |    2 +-
 .../window_relationships_overview.cc               |    2 +-
 .../report_layout/dialog_layout_report.cc          |    2 +-
 glom/mode_design/users/dialog_groups_list.cc       |    4 +-
 glom/print_layout/print_layout_utils.cc            |    2 +-
 glom/python_embed/glom_python.cc                   |   16 ++++----
 glom/utility_widgets/imageglom.cc                  |    4 +-
 glom/utility_widgets/layoutwidgetutils.cc          |    2 +-
 glom/utils_ui.cc                                   |    2 +-
 tests/glade_toplevels_instantiation.cc             |   12 +++---
 tests/import/test_parsing.cc                       |    2 +-
 tests/python/test_python_execute_func.cc           |    4 +-
 .../python/test_python_execute_func_bad_syntax.cc  |    4 +-
 .../test_python_execute_func_change_result_type.cc |    4 +-
 .../python/test_python_execute_func_with_record.cc |   10 ++--
 tests/python/test_python_execute_script.cc         |    6 +-
 tests/test_document_load.cc                        |   36 +++++++++---------
 tests/test_document_load_and_change.cc             |   36 +++++++++---------
 tests/test_document_load_and_save.cc               |   14 +++---
 tests/test_document_load_image.cc                  |    2 +-
 tests/test_document_load_translations.cc           |    2 +-
 tests/test_fake_connection.cc                      |    4 +-
 tests/test_glade_derived_instantiation.cc          |   10 ++--
 tests/test_parsing_time.cc                         |    8 ++--
 tests/test_script_check_for_problems.cc            |    6 +-
 tests/test_selfhosting_new_empty.cc                |    4 +-
 .../test_selfhosting_new_empty_change_sysprefs.cc  |    6 +-
 tests/test_selfhosting_new_empty_then_users.cc     |   40 ++++++++++----------
 tests/test_selfhosting_new_from_example.cc         |    4 +-
 tests/test_selfhosting_new_from_example_float.cc   |   12 +++---
 .../test_selfhosting_new_from_example_operator.cc  |   22 +++++-----
 ...est_selfhosting_new_from_example_strangepath.cc |    4 +-
 tests/test_selfhosting_new_then_alter_table.cc     |    8 ++--
 tests/test_selfhosting_new_then_backup_restore.cc  |   14 +++---
 tests/test_selfhosting_new_then_change_columns.cc  |   30 +++++++-------
 tests/test_selfhosting_new_then_choices.cc         |    8 ++--
 tests/test_selfhosting_new_then_get_privs.cc       |   12 +++---
 tests/test_selfhosting_new_then_image.cc           |   20 +++++-----
 tests/test_selfhosting_new_then_lookup.cc          |   40 ++++++++++----------
 tests/test_selfhosting_new_then_report.cc          |    6 +-
 tests/test_selfhosting_new_then_report_summary.cc  |   14 +++---
 tests/test_selfhosting_non_numeric_primary_keys.cc |    4 +-
 tests/test_selfhosting_sqlinjection.cc             |   26 ++++++------
 tests/test_selfhosting_utils.cc                    |   26 ++++++------
 tests/test_utils.cc                                |    4 +-
 tests/test_utils_images.cc                         |    4 +-
 tests/translations_po/test_document_export_po.cc   |   10 ++--
 tests/translations_po/test_document_import_po.cc   |   10 ++--
 89 files changed, 388 insertions(+), 388 deletions(-)
---
diff --git a/glom/application.cc b/glom/application.cc
index a5b9988..e3cacfe 100644
--- a/glom/application.cc
+++ b/glom/application.cc
@@ -197,7 +197,7 @@ int Application::on_command_line(const Glib::RefPtr<Gio::ApplicationCommandLine>
     if(!file->query_exists())
     {
       std::cerr << _("Glom: The file does not exist.") << std::endl;
-      std::cerr << "uri: " << input_uri << std::endl;
+      std::cerr << G_STRFUNC << ": uri: " << input_uri << std::endl;
 
       std::cerr << std::endl << context.get_help() << std::endl;
       return EXIT_FAILURE;
diff --git a/glom/appwindow.cc b/glom/appwindow.cc
index d2ac41b..288cb60 100644
--- a/glom/appwindow.cc
+++ b/glom/appwindow.cc
@@ -687,7 +687,7 @@ void AppWindow::open_browsed_document(const EpcServiceInfo* server, const Glib::
     }
     else
     {
-      std::cerr << "Could not parse the document that was retrieved over the network: failure_code=" << 
failure_code << std::endl;
+      std::cerr << G_STRFUNC << ": Could not parse the document that was retrieved over the network: 
failure_code=" << failure_code << std::endl;
     }
 
     g_free(document_contents);
@@ -1123,7 +1123,7 @@ bool AppWindow::on_document_load()
 
     if(!error_message.empty())
     {
-      std::cerr << "Python Error: " << error_message << std::endl;
+      std::cerr << G_STRFUNC << ": Python Error: " << error_message << std::endl;
     }
   }
 
@@ -1653,7 +1653,7 @@ bool AppWindow::recreate_database_from_example(bool& user_cancelled)
     //}
     //catch(const std::exception& ex)
     //{
-    //  std::cerr << "AppWindow::recreate_database_from_example(): exception: " << ex.what() << std::endl;
+    //  std::cerr << G_STRFUNC << ": AppWindow::recreate_database_from_example(): exception: " << ex.what() 
<< std::endl;
       //HandleError(ex);
     //}
 
diff --git a/glom/base_db.cc b/glom/base_db.cc
index d2e0710..745cdf6 100644
--- a/glom/base_db.cc
+++ b/glom/base_db.cc
@@ -117,7 +117,7 @@ sharedptr<SharedConnection> Base_DB::connect_to_server(Gtk::Window* parent_windo
 
 void Base_DB::handle_error(const Glib::Exception& ex)
 {
-  std::cerr << "Internal Error (Base_DB::handle_error()): exception type=" << typeid(ex).name() << ", 
ex.what()=" << ex.what() << std::endl;
+  std::cerr << G_STRFUNC << ": Internal Error (Base_DB::handle_error()): exception type=" << 
typeid(ex).name() << ", ex.what()=" << ex.what() << std::endl;
 
   Gtk::MessageDialog dialog(Utils::bold_message(_("Internal error")), true, Gtk::MESSAGE_WARNING );
   dialog.set_secondary_text(ex.what());
@@ -127,7 +127,7 @@ void Base_DB::handle_error(const Glib::Exception& ex)
 
 void Base_DB::handle_error(const std::exception& ex)
 {
-  std::cerr << "Internal Error (Base_DB::handle_error()): exception type=" << typeid(ex).name() << ", 
ex.what()=" << ex.what() << std::endl;
+  std::cerr << G_STRFUNC << ": Internal Error (Base_DB::handle_error()): exception type=" << 
typeid(ex).name() << ", ex.what()=" << ex.what() << std::endl;
 
   Gtk::MessageDialog dialog(Utils::bold_message(_("Internal error")), true, Gtk::MESSAGE_WARNING );
   dialog.set_secondary_text(ex.what());
diff --git a/glom/dialog_existing_or_new.cc b/glom/dialog_existing_or_new.cc
index 221ca43..616caf0 100644
--- a/glom/dialog_existing_or_new.cc
+++ b/glom/dialog_existing_or_new.cc
@@ -297,7 +297,7 @@ bool Dialog_ExistingOrNew::list_examples()
   }
   catch(const Glib::Exception& ex)
   {
-    std::cerr << "Could not enumerate examples. Error=" << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Could not enumerate examples. Error=" << ex.what() << std::endl;
   }
 
   return false;
@@ -683,7 +683,7 @@ Glib::ustring Dialog_ExistingOrNew::get_title_from_example(const std::string& re
   }
   catch(const Glib::Exception& exception)
   {
-    std::cerr << "Could not enumerate files in examples directory: " << exception.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Could not enumerate files in examples directory: " << exception.what() << 
std::endl;
 
     m_current_buffer.reset();
   }
@@ -726,7 +726,7 @@ void Dialog_ExistingOrNew::append_example(const Glib::ustring& title, const std:
   }
   catch(const Glib::Exception& ex)
   {
-    std::cerr << "Could not read example: " << resource_name << ": " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Could not read example: " << resource_name << ": " << ex.what() << 
std::endl;
   }
 }
 #endif /* !GLOM_ENABLE_CLIENT_ONLY */
diff --git a/glom/filechooser_export.cc b/glom/filechooser_export.cc
index 7a407f3..8bfbf0c 100644
--- a/glom/filechooser_export.cc
+++ b/glom/filechooser_export.cc
@@ -77,7 +77,7 @@ void FileChooser_Export::set_export_layout(const Document::type_list_layout_grou
   m_table_name = table_name;
   m_document = document;
   if(!m_document)
-    std::cerr << "FileChooser_Export::set_export_layout() document is NULL." << std::endl;
+    std::cerr << G_STRFUNC << ": FileChooser_Export::set_export_layout() document is NULL." << std::endl;
 }
 
 //We only allow a full export in client-only mode, 
diff --git a/glom/frame_glom.cc b/glom/frame_glom.cc
index 2ac0737..6bc8e13 100644
--- a/glom/frame_glom.cc
+++ b/glom/frame_glom.cc
@@ -706,7 +706,7 @@ void Frame_Glom::export_data_to_stream(std::ostream& the_stream, const FoundSet&
               size_t pos = field_text.find_first_of(newline_to_find);
               if(pos != std::string::npos)
               {
-                std::cerr << "export: binary data field text contains an unexpected newline: " << field_text 
<< std::endl;
+                std::cerr << G_STRFUNC << ": export: binary data field text contains an unexpected newline: 
" << field_text << std::endl;
                 continue;
               }
 
@@ -714,7 +714,7 @@ void Frame_Glom::export_data_to_stream(std::ostream& the_stream, const FoundSet&
               pos = field_text.find_first_of(quote_to_find);
               if(pos != std::string::npos)
               {
-                std::cerr << "export: binary data field text contains an unexpected quote: " << field_text 
<< std::endl;
+                std::cerr << G_STRFUNC << ": export: binary data field text contains an unexpected quote: " 
<< field_text << std::endl;
                 continue;
               }
             }
diff --git a/glom/glade_utils.h b/glom/glade_utils.h
index 2e44667..9407c5d 100644
--- a/glom/glade_utils.h
+++ b/glom/glade_utils.h
@@ -129,19 +129,19 @@ void get_glade_widget_with_warning(const std::string& filename, const Glib::ustr
   }
   catch(const Gtk::BuilderError& ex)
   {
-    std::cerr << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
   }
   catch(const Glib::MarkupError& ex)
   {
-    std::cerr << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
   }
   catch(const Glib::FileError& ex)
   {
-    std::cerr << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
   }
   catch(const Gio::ResourceError& ex)
   {
-    std::cerr << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
   }
 
   if(refXml)
diff --git a/glom/glom_create_from_example.cc b/glom/glom_create_from_example.cc
index 20b9e02..a019993 100644
--- a/glom/glom_create_from_example.cc
+++ b/glom/glom_create_from_example.cc
@@ -240,7 +240,7 @@ int main(int argc, char* argv[])
     //https://bugzilla.gnome.org/show_bug.cgi?id=619445
     //This should tell us what the problem is:
     std::cerr << G_STRFUNC << ": exception from std::locale::global(std::locale(\"\")): " << ex.what() << 
std::endl;
-    std::cerr << "  This can happen if the locale is not properly installed or configured." << std::endl;
+    std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured." 
<< std::endl;
   }
 
   
@@ -292,7 +292,7 @@ int main(int argc, char* argv[])
     if(!file->query_exists())
     {
       std::cerr << _("Glom: The file does not exist.") << std::endl;
-      std::cerr << "uri: " << input_uri << std::endl;
+      std::cerr << G_STRFUNC << ": uri: " << input_uri << std::endl;
 
       std::cerr << std::endl << context.get_help() << std::endl;
       return EXIT_FAILURE;
@@ -312,7 +312,7 @@ int main(int argc, char* argv[])
   
   if(input_uri.empty())
   {
-    std::cerr << "Please specify a glom example file." << std::endl;
+    std::cerr << G_STRFUNC << ": Please specify a glom example file." << std::endl;
     std::cerr << std::endl << context.get_help() << std::endl;
     return EXIT_FAILURE;
   }
@@ -321,7 +321,7 @@ int main(int argc, char* argv[])
   //Check the output directory path: 
   if(group.m_arg_filepath_dir_output.empty())
   {
-    std::cerr << "Please specify an output directory path." << std::endl;
+    std::cerr << G_STRFUNC << ": Please specify an output directory path." << std::endl;
     std::cerr << std::endl << context.get_help() << std::endl;
     return EXIT_FAILURE;
   }
@@ -333,7 +333,7 @@ int main(int argc, char* argv[])
     if(!file->query_exists())
     {
       std::cerr << _("Glom: The output directory does not exist.") << std::endl;
-      std::cerr << "uri: " << group.m_arg_filepath_dir_output << std::endl;
+      std::cerr << G_STRFUNC << ": uri: " << group.m_arg_filepath_dir_output << std::endl;
 
       std::cerr << std::endl << context.get_help() << std::endl;
       return EXIT_FAILURE;
@@ -351,7 +351,7 @@ int main(int argc, char* argv[])
   //Check the output name path: 
   if(group.m_arg_filepath_name_output.empty())
   {
-    std::cerr << "Please specify an output name." << std::endl;
+    std::cerr << G_STRFUNC << ": Please specify an output name." << std::endl;
     std::cerr << std::endl << context.get_help() << std::endl;
     return EXIT_FAILURE;
   }
@@ -366,7 +366,7 @@ int main(int argc, char* argv[])
 
   if(!test)
   {
-    std::cerr << "Document::load() failed with failure_code=" << failure_code << std::endl;
+    std::cerr << G_STRFUNC << ": Document::load() failed with failure_code=" << failure_code << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -392,7 +392,7 @@ int main(int argc, char* argv[])
     Glib::RefPtr<Gio::File> file = Gio::File::create_for_commandline_arg(uri);
     if(file->query_exists())
     {
-      std::cerr << "The output path already exists: " << filepath_dir << std::endl;
+      std::cerr << G_STRFUNC << ": The output path already exists: " << filepath_dir << std::endl;
       return EXIT_FAILURE;
     }
   }
@@ -459,7 +459,7 @@ int main(int argc, char* argv[])
 
 #ifdef G_OS_WIN32
     const char* password = "";
-    std::cerr << "Error: getpass() is not implemented in the Windows build. The connection will fail." << 
std::endl;
+    std::cerr << G_STRFUNC << ": Error: getpass() is not implemented in the Windows build. The connection 
will fail." << std::endl;
 #else
     const char* password = ::getpass(prompt.c_str());
 #endif
@@ -506,7 +506,7 @@ int main(int argc, char* argv[])
   const Glom::ConnectionPool::StartupErrors started = connection_pool->startup( 
sigc::ptr_fun(&on_startup_progress) );
   if(started != Glom::ConnectionPool::Backend::STARTUPERROR_NONE)
   {
-    std::cerr << "connection_pool->startup(): result=" << started << std::endl;
+    std::cerr << G_STRFUNC << ": connection_pool->startup(): result=" << started << std::endl;
     cleanup();
   }
   g_assert(started == Glom::ConnectionPool::Backend::STARTUPERROR_NONE);
diff --git a/glom/glom_export_po.cc b/glom/glom_export_po.cc
index 0de6926..af95123 100644
--- a/glom/glom_export_po.cc
+++ b/glom/glom_export_po.cc
@@ -93,7 +93,7 @@ int main(int argc, char* argv[])
     //https://bugzilla.gnome.org/show_bug.cgi?id=619445
     //This should tell us what the problem is:
     std::cerr << G_STRFUNC << ": exception from std::locale::global(std::locale(\"\")): " << ex.what() << 
std::endl;
-    std::cerr << "  This can happen if the locale is not properly installed or configured." << std::endl;
+    std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured." 
<< std::endl;
   }
   
 
@@ -160,7 +160,7 @@ int main(int argc, char* argv[])
   if(!file_input->query_exists())
   {
     std::cerr << _("Glom: The file does not exist.") << std::endl;
-    std::cerr << "uri: " << input_uri << std::endl;
+    std::cerr << G_STRFUNC << ": uri: " << input_uri << std::endl;
 
     std::cerr << std::endl << context.get_help() << std::endl;
     return EXIT_FAILURE;
@@ -190,7 +190,7 @@ int main(int argc, char* argv[])
   if(file_output->query_exists())
   {
     std::cerr << _("Glom: The output file aready exists.") << std::endl;
-    std::cerr << "uri: " << ouput_uri << std::endl;
+    std::cerr << G_STRFUNC << ": uri: " << ouput_uri << std::endl;
 
     std::cerr << std::endl << context.get_help() << std::endl;
     return EXIT_FAILURE;
@@ -207,7 +207,7 @@ int main(int argc, char* argv[])
 
   if(!test)
   {
-    std::cerr << "Document::load() failed with failure_code=" << failure_code << std::endl;
+    std::cerr << G_STRFUNC << ": Document::load() failed with failure_code=" << failure_code << std::endl;
     return EXIT_FAILURE;
   }
 
diff --git a/glom/glom_export_po_all.cc b/glom/glom_export_po_all.cc
index 40deec7..35e9344 100644
--- a/glom/glom_export_po_all.cc
+++ b/glom/glom_export_po_all.cc
@@ -81,7 +81,7 @@ int main(int argc, char* argv[])
     //https://bugzilla.gnome.org/show_bug.cgi?id=619445
     //This should tell us what the problem is:
     std::cerr << G_STRFUNC << ": exception from std::locale::global(std::locale(\"\")): " << ex.what() << 
std::endl;
-    std::cerr << "  This can happen if the locale is not properly installed or configured." << std::endl;
+    std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured." 
<< std::endl;
   }
 
   
@@ -141,7 +141,7 @@ int main(int argc, char* argv[])
   if(!file_input->query_exists())
   {
     std::cerr << _("The Glom file does not exist.") << std::endl;
-    std::cerr << "uri: " << input_uri << std::endl;
+    std::cerr << G_STRFUNC << ": uri: " << input_uri << std::endl;
 
     std::cerr << std::endl << context.get_help() << std::endl;
     return EXIT_FAILURE;
@@ -194,7 +194,7 @@ int main(int argc, char* argv[])
 
   if(!test)
   {
-    std::cerr << "Document::load() failed with failure_code=" << failure_code << std::endl;
+    std::cerr << G_STRFUNC << ": Document::load() failed with failure_code=" << failure_code << std::endl;
     return EXIT_FAILURE;
   }
 
diff --git a/glom/glom_import_po_all.cc b/glom/glom_import_po_all.cc
index da0f755..3510a8c 100644
--- a/glom/glom_import_po_all.cc
+++ b/glom/glom_import_po_all.cc
@@ -82,7 +82,7 @@ int main(int argc, char* argv[])
     //https://bugzilla.gnome.org/show_bug.cgi?id=619445
     //This should tell us what the problem is:
     std::cerr << G_STRFUNC << ": exception from std::locale::global(std::locale(\"\")): " << ex.what() << 
std::endl;
-    std::cerr << "  This can happen if the locale is not properly installed or configured." << std::endl;
+    std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured." 
<< std::endl;
   }
 
   
@@ -142,7 +142,7 @@ int main(int argc, char* argv[])
   if(!file_input->query_exists())
   {
     std::cerr << _("The Glom file does not exist.") << std::endl;
-    std::cerr << "uri: " << input_uri << std::endl;
+    std::cerr << G_STRFUNC << ": uri: " << input_uri << std::endl;
 
     std::cerr << std::endl << context.get_help() << std::endl;
     return EXIT_FAILURE;
@@ -185,7 +185,7 @@ int main(int argc, char* argv[])
 
   if(!test)
   {
-    std::cerr << "Document::load() failed with failure_code=" << failure_code << std::endl;
+    std::cerr << G_STRFUNC << ": Document::load() failed with failure_code=" << failure_code << std::endl;
     return EXIT_FAILURE;
   }
 
diff --git a/glom/glom_test_connection.cc b/glom/glom_test_connection.cc
index 69f5312..8470084 100644
--- a/glom/glom_test_connection.cc
+++ b/glom/glom_test_connection.cc
@@ -129,7 +129,7 @@ int main(int argc, char* argv[])
     //https://bugzilla.gnome.org/show_bug.cgi?id=619445
     //This should tell us what the problem is:
     std::cerr << G_STRFUNC << ": exception from std::locale::global(std::locale(\"\")): " << ex.what() << 
std::endl;
-    std::cerr << "  This can happen if the locale is not properly installed or configured." << std::endl;
+    std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured." 
<< std::endl;
   }
 
 
@@ -151,7 +151,7 @@ int main(int argc, char* argv[])
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << "Error: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Error: " << ex.what() << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -163,7 +163,7 @@ int main(int argc, char* argv[])
 
   if(group.m_arg_server_hostname.empty())
   {
-    std::cerr << "Please provide a database hostname." << std::endl;
+    std::cerr << G_STRFUNC << ": Please provide a database hostname." << std::endl;
     print_options_hint();
     return EXIT_FAILURE;
   }
@@ -184,7 +184,7 @@ int main(int argc, char* argv[])
 
 #ifdef G_OS_WIN32
   const char* password = "";
-  std::cerr << "Error: getpass() is not implemented in the Windows build. The connection will fail." << 
std::endl;
+  std::cerr << G_STRFUNC << ": Error: getpass() is not implemented in the Windows build. The connection will 
fail." << std::endl;
 #else
   const char* password = ::getpass(prompt.c_str());
 #endif
diff --git a/glom/import_csv/csv_parser.cc b/glom/import_csv/csv_parser.cc
index e33210b..1dffa5d 100644
--- a/glom/import_csv/csv_parser.cc
+++ b/glom/import_csv/csv_parser.cc
@@ -570,7 +570,7 @@ void CsvParser::on_file_query_info(const Glib::RefPtr<Gio::AsyncResult>& result,
   }
   catch(const Glib::Exception& ex)
   {
-    std::cerr << "Failed to fetch display name of uri " << source->get_uri() << ": " << ex.what() << 
std::endl;
+    std::cerr << G_STRFUNC << "Failed to fetch display name of uri " << source->get_uri() << ": " << 
ex.what() << std::endl;
   }
 }
 
diff --git a/glom/import_csv/dialog_import_csv.cc b/glom/import_csv/dialog_import_csv.cc
index fe0b1f5..7a08837 100644
--- a/glom/import_csv/dialog_import_csv.cc
+++ b/glom/import_csv/dialog_import_csv.cc
@@ -733,7 +733,7 @@ void Dialog_Import_CSV::on_parser_file_read_error(const Glib::ustring& error_mes
   }
   catch(const Glib::ConvertError& ex)
   {
-    std::cerr << "Glib::filename_from_uri() failed: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << "Glib::filename_from_uri() failed: " << ex.what() << std::endl;
 
     show_error_dialog(_("Could Not Open file"),
       Glib::ustring::compose(_("The file at \"%1\" could not be opened: %2"), filename, error_message) );
diff --git a/glom/import_csv/dialog_import_csv_progress.cc b/glom/import_csv/dialog_import_csv_progress.cc
index 7e8de21..23dc441 100644
--- a/glom/import_csv/dialog_import_csv_progress.cc
+++ b/glom/import_csv/dialog_import_csv_progress.cc
@@ -79,7 +79,7 @@ void Dialog_Import_CSV_Progress::import(Dialog_Import_CSV& data_source)
     }
     catch(const Glib::ConvertError& ex)
     {
-      std::cerr << "Glib::filename_from_uri() failed: " << ex.what() << std::endl;
+      std::cerr << G_STRFUNC << ": Glib::filename_from_uri() failed: " << ex.what() << std::endl;
     }
 
     m_progress_bar->set_text(Glib::ustring::compose(_("Parsing CSV file %1"), filename));
diff --git a/glom/libglom/connectionpool.cc b/glom/libglom/connectionpool.cc
index 9224433..9572c9e 100644
--- a/glom/libglom/connectionpool.cc
+++ b/glom/libglom/connectionpool.cc
@@ -484,7 +484,7 @@ bool ConnectionPool::convert_backup(const SlotProgress& slot_progress, const std
     //and a warning will only be useful later when get_meta_store_data() fails when used in 
get_table_names_from_database().
     if(!m_fake_connection)
     {
-      std::cerr << "ConnectionPool::connect(): update_meta_store_table_names() failed: " << ex.what() << 
std::endl;
+      std::cerr << G_STRFUNC << ": ConnectionPool::connect(): update_meta_store_table_names() failed: " << 
ex.what() << std::endl;
     }
   }
 
diff --git a/glom/libglom/connectionpool_backends/mysql.cc b/glom/libglom/connectionpool_backends/mysql.cc
index 6f162d6..1a20d39 100644
--- a/glom/libglom/connectionpool_backends/mysql.cc
+++ b/glom/libglom/connectionpool_backends/mysql.cc
@@ -144,7 +144,7 @@ Glib::RefPtr<Gnome::Gda::Connection> MySQL::attempt_connect(const Glib::ustring&
     if(temp_conn)
       std::cout << "  (Connection succeeds, but not to the specific database,  database=" << database << 
std::endl;
     else
-      std::cerr << "  (Could not connect even to the default database, database=" << database  << std::endl;
+      std::cerr << G_STRFUNC << ":   (Could not connect even to the default database, database=" << database 
 << std::endl;
 #endif
 
     throw ExceptionConnection(temp_conn ? ExceptionConnection::FAILURE_NO_DATABASE : 
ExceptionConnection::FAILURE_NO_SERVER);
@@ -389,7 +389,7 @@ bool MySQL::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connectio
   catch(const Glib::Error& ex)
   {
     std::cerr << G_STRFUNC << "Exception: " << ex.what() << std::endl;
-    std::cerr << "  Reverting the transaction." << std::endl;
+    std::cerr << G_STRFUNC << ":   Reverting the transaction." << std::endl;
     
     try
     {
@@ -589,7 +589,7 @@ bool MySQL::save_backup(const SlotProgress& slot_progress, const Glib::ustring&
 
   if(!result)
   {
-    std::cerr << "Error while attempting to call pg_dump." << std::endl;
+    std::cerr << G_STRFUNC << ": Error while attempting to call pg_dump." << std::endl;
   }
 
   return result;
@@ -650,7 +650,7 @@ bool MySQL::convert_backup(const SlotProgress& slot_progress, const std::string&
 
   if(!result)
   {
-    std::cerr << "Error while attempting to call pg_restore." << std::endl;
+    std::cerr << G_STRFUNC << ": Error while attempting to call pg_restore." << std::endl;
   }
 
   return result;
@@ -808,7 +808,7 @@ bool MySQL::create_text_file(const std::string& file_uri, const std::string& con
     const Gio::Error& ex = *error.get();
 #endif
     // 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 << ": ConnectionPool::create_text_file(): 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);
@@ -836,7 +836,7 @@ bool MySQL::create_text_file(const std::string& file_uri, const std::string& con
     Gio::Error& ex = *error.get();
 #endif
     // 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 << ": ConnectionPool::create_text_file(): 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);
@@ -844,7 +844,7 @@ bool MySQL::create_text_file(const std::string& file_uri, const std::string& con
 
   if(bytes_written != (gssize)contents_size)
   {
-    std::cerr << "ConnectionPool::create_text_file(): not all bytes written when writing to file." << 
std::endl
+    std::cerr << G_STRFUNC << ": ConnectionPool::create_text_file(): 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/mysql_self.cc 
b/glom/libglom/connectionpool_backends/mysql_self.cc
index 064cc47..38f2118 100644
--- a/glom/libglom/connectionpool_backends/mysql_self.cc
+++ b/glom/libglom/connectionpool_backends/mysql_self.cc
@@ -136,7 +136,7 @@ Backend::InitErrors MySQLSelfHosted::initialize(const SlotProgress& slot_progres
 
   if(initial_username.empty())
   {
-    std::cerr << "MySQLSelfHosted::initialize(). Username was empty while attempting to create self-hosting 
database" << std::endl;
+    std::cerr << G_STRFUNC << ": MySQLSelfHosted::initialize(). Username was empty while attempting to 
create self-hosting database" << std::endl;
     return INITERROR_OTHER;
   }
 
@@ -154,7 +154,7 @@ Backend::InitErrors MySQLSelfHosted::initialize(const SlotProgress& slot_progres
   const bool dbdir_created = create_directory_filepath(dbdir);
   if(!dbdir_created)
   {
-    std::cerr << "Couldn't create directory: " << dbdir << std::endl;
+    std::cerr << G_STRFUNC << ": Couldn't create directory: " << dbdir << std::endl;
 
     return INITERROR_COULD_NOT_CREATE_DIRECTORY;
   }
@@ -166,7 +166,7 @@ Backend::InitErrors MySQLSelfHosted::initialize(const SlotProgress& slot_progres
   const std::string dbdir_data = get_self_hosting_data_path(true /* create */);
   if(dbdir_data.empty())
   {
-    std::cerr << "Couldn't create the data directory: " << dbdir << std::endl;
+    std::cerr << G_STRFUNC << ": Couldn't create the data directory: " << dbdir << std::endl;
 
     return INITERROR_COULD_NOT_CREATE_DIRECTORY;
   }
@@ -189,7 +189,7 @@ Backend::InitErrors MySQLSelfHosted::initialize(const SlotProgress& slot_progres
   const bool result = Glom::Spawn::execute_command_line_and_wait(command_initdb, slot_progress);
   if(!result)
   {
-    std::cerr << "Error while attempting to create self-hosting MySQL database." << std::endl;
+    std::cerr << G_STRFUNC << ": Error while attempting to create self-hosting MySQL database." << std::endl;
   }
   else
   {
@@ -211,14 +211,14 @@ Backend::InitErrors MySQLSelfHosted::initialize(const SlotProgress& slot_progres
     //and we cannot take the risk of leaving the database with a default password.
     if(startup(slot_progress, false) != STARTUPERROR_NONE)
     {
-      std::cerr << "Error while attempting to create self-hosting MySQL database, while starting for the 
first time, to set the initial username and password." << std::endl;
+      std::cerr << G_STRFUNC << ": Error while attempting to create self-hosting MySQL database, while 
starting for the first time, to set the initial username and password." << std::endl;
       return INITERROR_OTHER;
     }
     else
     {
       if(!cleanup(slot_progress))
       {
-        std::cerr << "Error while attempting to create self-hosting MySQL database, while shutting down, 
after setting the initial username and password." << std::endl;
+        std::cerr << G_STRFUNC << ": Error while attempting to create self-hosting MySQL database, while 
shutting down, after setting the initial username and password." << std::endl;
         return INITERROR_OTHER;
       }
     }
@@ -395,7 +395,7 @@ Backend::StartupErrors MySQLSelfHosted::startup(const SlotProgress& slot_progres
 
     if(!result)
     {
-      std::cerr << "Error while attempting to start self-hosting MySQL database, when setting the initial 
password." << std::endl;
+      std::cerr << G_STRFUNC << ": Error while attempting to start self-hosting MySQL database, when setting 
the initial password." << std::endl;
       return STARTUPERROR_FAILED_UNKNOWN_REASON;
     }
 
@@ -539,7 +539,7 @@ bool MySQLSelfHosted::cleanup(const SlotProgress& slot_progress)
 
   if(!result)
   {
-    std::cerr << "Error while attempting to stop self-hosting of the MySQL database. Trying again."  << 
std::endl;
+    std::cerr << G_STRFUNC << ": Error while attempting to stop self-hosting of the MySQL database. Trying 
again."  << std::endl;
     
     //Show open connections for debugging:
     try
@@ -556,7 +556,7 @@ bool MySQLSelfHosted::cleanup(const SlotProgress& slot_progress)
     const bool result = Glom::Spawn::execute_command_line_and_wait(command_mysql_stop, slot_progress);
     if(!result)
     {
-      std::cerr << "Error while attempting (for a second time) to stop self-hosting of the database."  << 
std::endl;
+      std::cerr << G_STRFUNC << ": Error while attempting (for a second time) to stop self-hosting of the 
database."  << std::endl;
       return false;
     }
   }
@@ -667,7 +667,7 @@ unsigned int MySQLSelfHosted::discover_first_free_port(unsigned int start_port,
   if(fd == -1)
   {
 #ifdef G_OS_WIN32
-    std::cerr << "Create socket: " << WSAGetLastError() << std::endl;
+    std::cerr << G_STRFUNC << ": Create socket: " << WSAGetLastError() << std::endl;
 #else
     perror("Create socket");
 #endif //G_OS_WIN32
diff --git a/glom/libglom/connectionpool_backends/postgres.cc 
b/glom/libglom/connectionpool_backends/postgres.cc
index d306c59..98f0770 100644
--- a/glom/libglom/connectionpool_backends/postgres.cc
+++ b/glom/libglom/connectionpool_backends/postgres.cc
@@ -131,7 +131,7 @@ Glib::RefPtr<Gnome::Gda::Connection> Postgres::attempt_connect(const Glib::ustri
     if(temp_conn)
       std::cout << "  (Connection succeeds, but not to the specific database,  database=" << database << 
std::endl;
     else
-      std::cerr << "  (Could not connect even to the default database, database=" << database  << std::endl;
+      std::cerr << G_STRFUNC << ":   (Could not connect even to the default database, database=" << database 
 << std::endl;
 #endif
 
     throw ExceptionConnection(temp_conn ? ExceptionConnection::FAILURE_NO_DATABASE : 
ExceptionConnection::FAILURE_NO_SERVER);
@@ -373,8 +373,8 @@ bool Postgres::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connec
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << "Exception: " << ex.what() << std::endl;
-    std::cerr << "Reverting the transaction." << std::endl;
+    std::cerr << G_STRFUNC << ": Exception: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Reverting the transaction." << std::endl;
     
     try
     {
@@ -382,7 +382,7 @@ bool Postgres::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connec
     }
     catch(const Glib::Error& ex)
     {
-      std::cerr << "Could not rollback the transaction: Exception: " << ex.what() << std::endl;
+      std::cerr << G_STRFUNC << ": Could not rollback the transaction: Exception: " << ex.what() << 
std::endl;
     }
   }
   
@@ -654,7 +654,7 @@ bool Postgres::save_backup(const SlotProgress& slot_progress, const Glib::ustrin
 
   if(!result)
   {
-    std::cerr << "Error while attempting to call pg_dump." << std::endl;
+    std::cerr << G_STRFUNC << ": Error while attempting to call pg_dump." << std::endl;
   }
 
   return result;
@@ -738,7 +738,7 @@ bool Postgres::convert_backup(const SlotProgress& slot_progress, const std::stri
 
   if(!result)
   {
-    std::cerr << "Error while attempting to call pg_restore." << std::endl;
+    std::cerr << G_STRFUNC << ": Error while attempting to call pg_restore." << std::endl;
   }
 
   return result;
@@ -896,7 +896,7 @@ bool Postgres::create_text_file(const std::string& file_uri, const std::string&
     const Gio::Error& ex = *error.get();
 #endif
     // 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 << ": ConnectionPool::create_text_file(): 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);
@@ -924,7 +924,7 @@ bool Postgres::create_text_file(const std::string& file_uri, const std::string&
     Gio::Error& ex = *error.get();
 #endif
     // 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 << ": ConnectionPool::create_text_file(): 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);
@@ -932,7 +932,7 @@ bool Postgres::create_text_file(const std::string& file_uri, const std::string&
 
   if(bytes_written != (gssize)contents_size)
   {
-    std::cerr << "ConnectionPool::create_text_file(): not all bytes written when writing to file." << 
std::endl
+    std::cerr << G_STRFUNC << ": ConnectionPool::create_text_file(): 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/postgres_self.cc 
b/glom/libglom/connectionpool_backends/postgres_self.cc
index 97b281d..d32cbff 100644
--- a/glom/libglom/connectionpool_backends/postgres_self.cc
+++ b/glom/libglom/connectionpool_backends/postgres_self.cc
@@ -156,7 +156,7 @@ Backend::InitErrors PostgresSelfHosted::initialize(const SlotProgress& slot_prog
 
   if(initial_username.empty())
   {
-    std::cerr << "PostgresSelfHosted::initialize(). Username was empty while attempting to create 
self-hosting database" << std::endl;
+    std::cerr << G_STRFUNC << ": PostgresSelfHosted::initialize(). Username was empty while attempting to 
create self-hosting database" << std::endl;
     return INITERROR_OTHER;
   }
 
@@ -174,7 +174,7 @@ Backend::InitErrors PostgresSelfHosted::initialize(const SlotProgress& slot_prog
   const bool dbdir_created = create_directory_filepath(dbdir);
   if(!dbdir_created)
   {
-    std::cerr << "Couldn't create directory: " << dbdir << std::endl;
+    std::cerr << G_STRFUNC << ": Couldn't create directory: " << dbdir << std::endl;
 
     return INITERROR_COULD_NOT_CREATE_DIRECTORY;
   }
@@ -183,7 +183,7 @@ Backend::InitErrors PostgresSelfHosted::initialize(const SlotProgress& slot_prog
   const std::string dbdir_config = get_self_hosting_config_path(true /* create */);
   if(dbdir_config.empty())
   {
-    std::cerr << "Couldn't create the config directory: " << dbdir << std::endl;
+    std::cerr << G_STRFUNC << ": Couldn't create the config directory: " << dbdir << std::endl;
 
     return INITERROR_COULD_NOT_CREATE_DIRECTORY;
   }
@@ -195,7 +195,7 @@ Backend::InitErrors PostgresSelfHosted::initialize(const SlotProgress& slot_prog
   const std::string dbdir_data = get_self_hosting_data_path(true /* create */);
   if(dbdir_data.empty())
   {
-    std::cerr << "Couldn't create the data directory: " << dbdir << std::endl;
+    std::cerr << G_STRFUNC << ": Couldn't create the data directory: " << dbdir << std::endl;
 
     return INITERROR_COULD_NOT_CREATE_DIRECTORY;
   }
@@ -217,7 +217,7 @@ Backend::InitErrors PostgresSelfHosted::initialize(const SlotProgress& slot_prog
   const bool result = Glom::Spawn::execute_command_line_and_wait(command_initdb, slot_progress);
   if(!result)
   {
-    std::cerr << "Error while attempting to create self-hosting database." << std::endl;
+    std::cerr << G_STRFUNC << ": Error while attempting to create self-hosting database." << std::endl;
   }
 
   const int temp_pwfile_removed = g_remove(temp_pwfile.c_str()); //Of course, we don't want this to stay 
around. It would be a security risk.
@@ -237,7 +237,7 @@ Glib::ustring PostgresSelfHosted::get_postgresql_utils_version(const SlotProgres
   const bool spawn_result = Glom::Spawn::execute_command_line_and_wait(command, slot_progress, output);
   if(!spawn_result)
   {
-    std::cerr << "Error while attempting to discover the pg_ctl version." << std::endl;
+    std::cerr << G_STRFUNC << ": Error while attempting to discover the pg_ctl version." << std::endl;
     return result;
   }
 
@@ -253,7 +253,7 @@ Glib::ustring PostgresSelfHosted::get_postgresql_utils_version(const SlotProgres
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << "Glom: Glib::Regex::create() failed: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Glom: Glib::Regex::create() failed: " << ex.what() << std::endl;
     return result;
   }
 
@@ -295,7 +295,7 @@ float PostgresSelfHosted::get_postgresql_utils_version_as_number(const SlotProgr
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << "Glom: Glib::Regex::create() failed: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Glom: Glib::Regex::create() failed: " << ex.what() << std::endl;
     return result;
   }
 
@@ -375,7 +375,7 @@ Backend::StartupErrors PostgresSelfHosted::startup(const SlotProgress& slot_prog
     }
     else
     {
-      std::cerr << "ConnectionPool::create_self_hosting(): The data sub-directory could not be found." << 
dbdir_data_uri << std::endl;
+      std::cerr << G_STRFUNC << ": ConnectionPool::create_self_hosting(): The data sub-directory could not 
be found." << dbdir_data_uri << std::endl;
       return STARTUPERROR_FAILED_NO_DATA;
     }
   }
@@ -429,7 +429,7 @@ Backend::StartupErrors PostgresSelfHosted::startup(const SlotProgress& slot_prog
   const bool result = 
Glom::Spawn::execute_command_line_and_wait_until_second_command_returns_success(command_postgres_start, 
command_check_postgres_has_started, slot_progress, second_command_success_text);
   if(!result)
   {
-    std::cerr << "Error while attempting to self-host a database." << std::endl;
+    std::cerr << G_STRFUNC << ": Error while attempting to self-host a database." << std::endl;
     return STARTUPERROR_FAILED_UNKNOWN_REASON;
   }
 
@@ -506,7 +506,7 @@ bool PostgresSelfHosted::cleanup(const SlotProgress& slot_progress)
   const bool result = Glom::Spawn::execute_command_line_and_wait(command_postgres_stop, slot_progress);
   if(!result)
   {
-    std::cerr << "Error while attempting to stop self-hosting of the database. Trying again."  << std::endl;
+    std::cerr << G_STRFUNC << ": Error while attempting to stop self-hosting of the database. Trying again." 
 << std::endl;
     
     //Show open connections for debugging:
     try
@@ -523,7 +523,7 @@ bool PostgresSelfHosted::cleanup(const SlotProgress& slot_progress)
     const bool result = Glom::Spawn::execute_command_line_and_wait(command_postgres_stop, slot_progress);
     if(!result)
     {
-      std::cerr << "Error while attempting (for a second time) to stop self-hosting of the database."  << 
std::endl;
+      std::cerr << G_STRFUNC << ": Error while attempting (for a second time) to stop self-hosting of the 
database."  << std::endl;
       return false;
     }
   }
@@ -650,7 +650,7 @@ unsigned int PostgresSelfHosted::discover_first_free_port(unsigned int start_por
   if(fd == -1)
   {
 #ifdef G_OS_WIN32
-    std::cerr << "Create socket: " << WSAGetLastError() << std::endl;
+    std::cerr << G_STRFUNC << ": Create socket: " << WSAGetLastError() << std::endl;
 #else
     perror("Create socket");
 #endif //G_OS_WIN32
diff --git a/glom/libglom/connectionpool_backends/sqlite.cc b/glom/libglom/connectionpool_backends/sqlite.cc
index 683789a..272862b 100644
--- a/glom/libglom/connectionpool_backends/sqlite.cc
+++ b/glom/libglom/connectionpool_backends/sqlite.cc
@@ -56,7 +56,7 @@ Glib::RefPtr<Gnome::Gda::Connection> Sqlite::connect(const Glib::ustring& databa
     //and only the caller knows if this failure might be expected,
     //for instance when checking for an unused database name.
     //std::cerr << G_STRFUNC << ": The db file does not exist at path: " << db_file->get_uri() << std::endl;
-    //std::cerr << "  as filepath: " << db_file->get_path() << std::endl;
+    //std::cerr << G_STRFUNC << ":   as filepath: " << db_file->get_path() << std::endl;
   }
   else
   {
diff --git a/glom/libglom/data_structure/fieldtypes.cc b/glom/libglom/data_structure/fieldtypes.cc
index d81c9df..abb0fa0 100644
--- a/glom/libglom/data_structure/fieldtypes.cc
+++ b/glom/libglom/data_structure/fieldtypes.cc
@@ -186,10 +186,10 @@ Glib::ustring FieldTypes::get_string_name_for_gdavaluetype(GType field_type) con
 
     std::cerr << G_STRFUNC << ": returning unknowntype for field_type=" << field_type << " (" << 
g_type_name(field_type) << ")" << std::endl;
 
-    std::cerr << "  possible types are: " << std::endl;
+    std::cerr << G_STRFUNC << ":   possible types are: " << std::endl;
     for(type_mapGdaTypesToSchemaStrings::const_iterator iter = m_mapGdaTypesToSchemaStrings.begin(); iter != 
m_mapGdaTypesToSchemaStrings.end(); ++iter)
     {
-      std::cerr << "    gdatype=" << iter->first << " (" << g_type_name(iter->first) << "), sqltype=" << 
iter->second << std::endl;
+      std::cerr << G_STRFUNC << ":     gdatype=" << iter->first << " (" << g_type_name(iter->first) << "), 
sqltype=" << iter->second << std::endl;
     }
     
     return "unknowntype";
diff --git a/glom/libglom/data_structure/glomconversions.cc b/glom/libglom/data_structure/glomconversions.cc
index 3a923b6..9a407ce 100644
--- a/glom/libglom/data_structure/glomconversions.cc
+++ b/glom/libglom/data_structure/glomconversions.cc
@@ -49,7 +49,7 @@ Glib::ustring Conversions::format_time(const tm& tm_data)
   catch(const std::runtime_error& ex)
   {
     std::cerr << G_STRFUNC << ": exception from std::locale(\"\")): " << ex.what() << std::endl;
-    std::cerr << "  This can happen if the locale is not properly installed or configured." << std::endl;
+    std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured." 
<< std::endl;
     return Glib::ustring();
   } 
 }
@@ -74,7 +74,7 @@ Glib::ustring Conversions::format_date(const tm& tm_data)
   catch(const std::runtime_error& ex)
   {
     std::cerr << G_STRFUNC << ": exception from std::locale(\"\")): " << ex.what() << std::endl;
-    std::cerr << "  This can happen if the locale is not properly installed or configured." << std::endl;
+    std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured." 
<< std::endl;
     return Glib::ustring();
   }
 }
@@ -228,7 +228,7 @@ Glib::ustring Conversions::format_tm(const tm& tm_data, const std::locale& local
   catch(const std::runtime_error& ex)
   {
     std::cerr << G_STRFUNC << ": exception from std::locale(\"\")): " << ex.what() << std::endl;
-    std::cerr << "  This can happen if the locale is not properly installed or configured." << std::endl;
+    std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured." 
<< std::endl;
   }
 
   //std::cout << "debug: " << G_STRFUNC << ": returning: " << text << std::endl;
@@ -300,7 +300,7 @@ Glib::ustring Conversions::get_text_for_gda_value(Field::glom_field_type glom_ty
   catch(const std::runtime_error& ex)
   {
     std::cerr << G_STRFUNC << ": exception from std::locale(\"\")): " << ex.what() << std::endl;
-    std::cerr << "  This can happen if the locale is not properly installed or configured." << std::endl;
+    std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured." 
<< std::endl;
     return Glib::ustring();
   }
 }
@@ -490,7 +490,7 @@ Glib::ustring Conversions::get_text_for_gda_value(Field::glom_field_type glom_ty
     catch(const std::runtime_error& ex)
     {
       std::cerr << G_STRFUNC << ": exception from std::locale(\"\")): " << ex.what() << std::endl;
-      std::cerr << "  This can happen if the locale is not properly installed or configured." << std::endl;
+      std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured." 
<< std::endl;
     }      
 
     //std::cout << "debug: " << G_STRFUNC << ": number=" << number << ", text=" << text << std::endl;
@@ -549,7 +549,7 @@ Gnome::Gda::Value Conversions::parse_value(Field::glom_field_type glom_type, con
   catch(const std::runtime_error& ex)
   {
     std::cerr << G_STRFUNC << ": exception from std::locale(\"\")): " << ex.what() << std::endl;
-    std::cerr << "  This can happen if the locale is not properly installed or configured." << std::endl;
+    std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured." 
<< std::endl;
   } 
   
   //Put a NULL in the database for empty dates, times, and numerics, because 0 would be an actual value.
@@ -651,7 +651,7 @@ tm Conversions::parse_date(const Glib::ustring& text, bool& success)
   catch(const std::runtime_error& ex)
   {
     std::cerr << G_STRFUNC << ": exception from std::locale(\"\")): " << ex.what() << std::endl;
-    std::cerr << "  This can happen if the locale is not properly installed or configured." << std::endl;
+    std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured." 
<< std::endl;
     
     tm the_c_time;
     memset(&the_c_time, 0, sizeof(the_c_time));
@@ -786,7 +786,7 @@ tm Conversions::parse_time(const Glib::ustring& text, bool& success)
   catch(const std::runtime_error& ex)
   {
     std::cerr << G_STRFUNC << ": exception from std::locale(\"\")): " << ex.what() << std::endl;
-    std::cerr << "  This can happen if the locale is not properly installed or configured." << std::endl;
+    std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured." 
<< std::endl;
   } 
   
   if(success)
diff --git a/glom/libglom/db_utils.cc b/glom/libglom/db_utils.cc
index f947a9d..b2994ab 100644
--- a/glom/libglom/db_utils.cc
+++ b/glom/libglom/db_utils.cc
@@ -1785,7 +1785,7 @@ bool query_execute_string(const Glib::ustring& strQuery, const Glib::RefPtr<Gnom
   {
     std::cerr << G_STRFUNC << ":  ConnectionError: " << error.what() << std::endl;
     const Glib::ustring full_query = stmt->to_sql(params);
-    std::cerr << "  full_query: " << full_query << std::endl;
+    std::cerr << G_STRFUNC << ":   full_query: " << full_query << std::endl;
     return false;
   }
   
@@ -1827,21 +1827,21 @@ bool query_execute(const Glib::RefPtr<const Gnome::Gda::SqlBuilder>& builder)
   {
     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;
+    std::cerr << G_STRFUNC << ":   full_query: " << full_query << std::endl;
     return false;
   }
   catch(const Gnome::Gda::ServerProviderError& ex)
   {
     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;
+    std::cerr << G_STRFUNC << ":   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 << 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;
+    std::cerr << G_STRFUNC << ":   full_query: " << full_query << std::endl;
     return false;
   }
   catch(const Glib::Error& ex)
@@ -1986,7 +1986,7 @@ int count_rows_returned_by(const Glib::RefPtr<const Gnome::Gda::SqlBuilder>& sql
   if(datamodel && datamodel->get_n_rows() && datamodel->get_n_columns())
   {
     const Gnome::Gda::Value value = datamodel->get_value_at(0, 0);
-    //This showed me that this contains a gint64: std::cerr << "DEBUG: value type=" << 
G_VALUE_TYPE_NAME(value.gobj()) << std::endl;
+    //This showed me that this contains a gint64: std::cerr << G_STRFUNC << ": DEBUG: value type=" << 
G_VALUE_TYPE_NAME(value.gobj()) << std::endl;
     //For sqlite, this is an integer
     if(value.get_value_type() == G_TYPE_INT64) //With the PostgreSQL backend.
       result = (int)value.get_int64();
diff --git a/glom/libglom/document/bakery/document.cc b/glom/libglom/document/bakery/document.cc
index ab994cd..a88b032 100644
--- a/glom/libglom/document/bakery/document.cc
+++ b/glom/libglom/document/bakery/document.cc
@@ -212,7 +212,7 @@ bool Document::read_from_disk(int& failure_code)
   catch(const Gio::Error& ex)
   {
     std::cerr << G_STRFUNC << ": Error: " << ex.what() << std::endl;
-    std::cerr << " with m_file_uri=" << m_file_uri << std::endl;
+    std::cerr << G_STRFUNC << ":  with m_file_uri=" << m_file_uri << std::endl;
 
 
     if(ex.code() == Gio::Error::NOT_FOUND)
@@ -302,7 +302,7 @@ bool Document::write_to_disk()
           if(parent->query_file_type() != Gio::FILE_TYPE_DIRECTORY)
           {
             std::cerr << G_STRFUNC << ": This part of the URI is not a directory: " << parent->get_uri() <<  
std::endl;
-            std::cerr << "  using m_file_uri = " << m_file_uri << std::endl;
+            std::cerr << G_STRFUNC << ":   using m_file_uri = " << m_file_uri << std::endl;
             return false;
           } 
         }
diff --git a/glom/libglom/document/bakery/document_xml.cc b/glom/libglom/document/bakery/document_xml.cc
index a920384..02fee66 100644
--- a/glom/libglom/document/bakery/document_xml.cc
+++ b/glom/libglom/document/bakery/document_xml.cc
@@ -63,7 +63,7 @@ bool Document_XML::load_after(int& failure_code)
 #ifdef LIBXMLCPP_EXCEPTIONS_ENABLED
   catch(const std::exception& ex)
   {
-    std::cerr << "XML Parser error: \n" << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": XML Parser error: \n" << ex.what() << std::endl;
 
     return false; //Failed.
   }
diff --git a/glom/libglom/document/document.cc b/glom/libglom/document/document.cc
index e13e898..712bdda 100644
--- a/glom/libglom/document/document.cc
+++ b/glom/libglom/document/document.cc
@@ -910,7 +910,7 @@ void Document::set_table_fields(const Glib::ustring& table_name, const type_vec_
   {
     if(vecFields.empty())
     {
-      std::cerr << ": vecFields is empty: table_name=" << table_name << std::endl;
+      std::cerr << G_STRFUNC << ": : vecFields is empty: table_name=" << table_name << std::endl;
     }
 
     const sharedptr<DocumentTableInfo> info = get_table_info_with_add(table_name);
diff --git a/glom/libglom/privs.cc b/glom/libglom/privs.cc
index 1414c74..ec97733 100644
--- a/glom/libglom/privs.cc
+++ b/glom/libglom/privs.cc
@@ -319,7 +319,7 @@ Privileges Privs::get_table_privileges(const Glib::ustring& group_name, const Gl
   Glib::RefPtr<Gnome::Gda::Connection> connection = get_connection();
   if(!connection)
   {
-    std::cerr << ": Could not get a connection." << std::endl;
+    std::cerr << G_STRFUNC << ": : Could not get a connection." << std::endl;
     return result;
   }
 
diff --git a/glom/libglom/python_embed/py_glom_record.cc b/glom/libglom/python_embed/py_glom_record.cc
index 0e8ed59..90f8856 100644
--- a/glom/libglom/python_embed/py_glom_record.cc
+++ b/glom/libglom/python_embed/py_glom_record.cc
@@ -66,7 +66,7 @@ boost::python::object PyGlomRecord::get_connection()
   {
     if(!_PyGObject_API)
     {
-      std::cerr << "pyggobject does not seem to be initialized properly." << std::endl;
+      std::cerr << G_STRFUNC << ": pyggobject does not seem to be initialized properly." << std::endl;
       return result;
     }
 
@@ -130,7 +130,7 @@ void PyGlomRecord::setitem(const boost::python::object& key, const boost::python
 {
   if(m_read_only)
   {
-    std::cerr << "PyGlomRecord::setitem(): Failed to set a value because the record object is read-only."<< 
std::endl;
+    std::cerr << G_STRFUNC << ": PyGlomRecord::setitem(): Failed to set a value because the record object is 
read-only."<< std::endl;
     return;
   }
   //Get the specified field name (and details) and value:
diff --git a/glom/libglom/python_embed/pygdavalue_conversions.cc 
b/glom/libglom/python_embed/pygdavalue_conversions.cc
index c987f43..2bfdbbe 100644
--- a/glom/libglom/python_embed/pygdavalue_conversions.cc
+++ b/glom/libglom/python_embed/pygdavalue_conversions.cc
@@ -264,7 +264,7 @@ boost::python::object glom_pygda_value_as_boost_pyobject(const Glib::ValueBase&
     } else if(value_type == G_TYPE_UINT) {
         ret = boost::python::object(g_value_get_uint(boxed));
     } else {
-      std::cerr << "Glom: G_VALUE_TYPE() returned unknown type: " << value_type << std::endl;
+      std::cerr << G_STRFUNC << ": Glom: G_VALUE_TYPE() returned unknown type: " << value_type << std::endl;
     }
 
     return ret;
diff --git a/glom/libglom/spawn_with_feedback.cc b/glom/libglom/spawn_with_feedback.cc
index 765023d..f76b6b1 100644
--- a/glom/libglom/spawn_with_feedback.cc
+++ b/glom/libglom/spawn_with_feedback.cc
@@ -134,7 +134,7 @@ private:
       }
       catch(const Glib::Exception& ex)
       {
-        std::cerr << "Glom::Spawn::Impl::SpawnInfo::on_io: Error while reading from pipe: " << ex.what() << 
std::endl;
+        std::cerr << G_STRFUNC << ": Glom::Spawn::Impl::SpawnInfo::on_io: Error while reading from pipe: " 
<< ex.what() << std::endl;
         return false;
       }
 
diff --git a/glom/libglom/test_sync.cc b/glom/libglom/test_sync.cc
index f3787d5..1cdbeee 100644
--- a/glom/libglom/test_sync.cc
+++ b/glom/libglom/test_sync.cc
@@ -38,7 +38,7 @@ main(int argc, char* argv[])
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << "Exception caught: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Exception caught: " << ex.what() << std::endl;
   }
 
   return 0;
diff --git a/glom/libglom/translations_po.cc b/glom/libglom/translations_po.cc
index df2c619..1250938 100644
--- a/glom/libglom/translations_po.cc
+++ b/glom/libglom/translations_po.cc
@@ -122,7 +122,7 @@ static void on_gettextpo_xerror2 (int severity, po_message_t /* message1 */, con
 #else //HAVE_GETTEXTPO_XERROR
 static void on_gettextpo_error(int status, int errnum, const char * /* format */, ...)
 {
-  std::cerr << "gettext error (old libgettext-po API): status=" << status << ", errnum=" << errnum << 
std::endl;
+  std::cerr << G_STRFUNC << ": gettext error (old libgettext-po API): status=" << status << ", errnum=" << 
errnum << std::endl;
 }
 #endif //HAVE_GETTEXTPO_XERROR
 
diff --git a/glom/libglom/utils.cc b/glom/libglom/utils.cc
index 9ec5b5e..712b0b5 100644
--- a/glom/libglom/utils.cc
+++ b/glom/libglom/utils.cc
@@ -1199,13 +1199,13 @@ Glib::RefPtr<Gnome::Gda::SqlBuilder> Utils::build_sql_update_with_where_clause(
 
   if(!field || field->get_name().empty())
   {
-    std::cerr << "field was null or its name was empty." << std::endl;
+    std::cerr << G_STRFUNC << ": field was null or its name was empty." << std::endl;
     return builder;
   }
 
   if(table_name.empty())
   {
-    std::cerr << "table_name was empty." << std::endl;
+    std::cerr << G_STRFUNC << ": table_name was empty." << std::endl;
     return builder;
   }
 
diff --git a/glom/main.cc b/glom/main.cc
index 6646e44..46a3f7e 100644
--- a/glom/main.cc
+++ b/glom/main.cc
@@ -415,7 +415,7 @@ main(int argc, char* argv[])
   int errcode = WSAStartup(MAKEWORD(2, 0), &data);
   if(errcode != 0)
   {
-    std::cerr << "Failed to initialize WinSock: " << errcode << std::endl;
+    std::cerr << G_STRFUNC << ": Failed to initialize WinSock: " << errcode << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -475,7 +475,7 @@ main(int argc, char* argv[])
     //https://bugzilla.gnome.org/show_bug.cgi?id=619445
     //This should tell us what the problem is:
     std::cerr << G_STRFUNC << ": exception from std::locale::global(std::locale(\"\")): " << ex.what() << 
std::endl;
-    std::cerr << "  This can happen if the locale is not properly installed or configured." << std::endl;
+    std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured." 
<< std::endl;
   }
 
   Glom::libglom_init(); //Also initializes python.
@@ -555,12 +555,12 @@ main(int argc, char* argv[])
   catch(const Glib::Exception& ex)
   {
     //If this happens then comment out the try/catch, and let the debugger show the call stack.
-    std::cerr << "Glom: exception: \n  " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Glom: exception: \n  " << ex.what() << std::endl;
   }
   catch(const std::exception& ex)
   {
     //If this happens then comment out the try/catch, and let the debugger show the call stack.
-    std::cerr << "Glom: exception: \n  " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Glom: exception: \n  " << ex.what() << std::endl;
   }
 
   Glom::libglom_deinit();
diff --git a/glom/main_local_options.cc b/glom/main_local_options.cc
index fb781b2..2cf8d8e 100644
--- a/glom/main_local_options.cc
+++ b/glom/main_local_options.cc
@@ -70,14 +70,14 @@ bool LocalOptionGroup::handle_options()
     Glom::Conversions::sanity_check_date_text_representation_uses_4_digit_years(m_arg_debug_date_check /* 
show debug output */);
   if(!test1)
   {
-    std::cerr << "Glom: ERROR: Date presentation sanity checks failed. Glom will not display dates 
correctly. This needs attention from a translator. Please file a bug. See http://www.glom.org."; << std::endl;
+    std::cerr << G_STRFUNC << ": Glom: ERROR: Date presentation sanity checks failed. Glom will not display 
dates correctly. This needs attention from a translator. Please file a bug. See http://www.glom.org."; << 
std::endl;
     m_debug_date_check_result = false;
   }
 
   const bool test2 = Glom::Conversions::sanity_check_date_parsing();
   if(!test2)
   {
-    std::cerr << "Glom: ERROR: Date parsing sanity checks failed. Glom will not interpret dates correctly. 
This needs attention from a translator. Please file a bug. See http://www.glom.org."; << std::endl;
+    std::cerr << G_STRFUNC << ": Glom: ERROR: Date parsing sanity checks failed. Glom will not interpret 
dates correctly. This needs attention from a translator. Please file a bug. See http://www.glom.org."; << 
std::endl;
     m_debug_date_check_result = false;
   }
 
diff --git a/glom/mode_data/box_data.cc b/glom/mode_data/box_data.cc
index 2f82608..98e8764 100644
--- a/glom/mode_data/box_data.cc
+++ b/glom/mode_data/box_data.cc
@@ -374,7 +374,7 @@ void Box_Data::execute_button_script(const sharedptr<const LayoutItem_Button>& l
     error_message);
   if(!error_message.empty())
   {
-    std::cerr << "Python Error: " << error_message << std::endl;
+    std::cerr << G_STRFUNC << ": Python Error: " << error_message << std::endl;
   }
 }
 
diff --git a/glom/mode_data/datawidget/combochoiceswithtreemodel.cc 
b/glom/mode_data/datawidget/combochoiceswithtreemodel.cc
index b4e36ed..573550d 100644
--- a/glom/mode_data/datawidget/combochoiceswithtreemodel.cc
+++ b/glom/mode_data/datawidget/combochoiceswithtreemodel.cc
@@ -364,7 +364,7 @@ void ComboChoicesWithTreeModel::set_cell_for_field_value(Gtk::CellRenderer* cell
         pDerived->property_pixbuf() = pixbuf;
       }
       else
-        std::cerr << "Field::sql(): glom_type is TYPE_IMAGE but gda type is not VALUE_TYPE_BINARY" << 
std::endl;
+        std::cerr << G_STRFUNC << ": Field::sql(): glom_type is TYPE_IMAGE but gda type is not 
VALUE_TYPE_BINARY" << std::endl;
 
       break;
     }
diff --git a/glom/mode_data/datawidget/treemodel_db.cc b/glom/mode_data/datawidget/treemodel_db.cc
index ceb4a3b..32c1e64 100644
--- a/glom/mode_data/datawidget/treemodel_db.cc
+++ b/glom/mode_data/datawidget/treemodel_db.cc
@@ -254,7 +254,7 @@ DbTreeModel::DbTreeModel(const FoundSet& found_set, const type_vec_const_layout_
       {
         const sharedptr<const LayoutItem_Field> layout_item = *iter;
         if(layout_item)
-          std::cerr << "  field: " << layout_item->get_name() << std::endl;
+          std::cerr << G_STRFUNC << ":   field: " << layout_item->get_name() << std::endl;
       }
       
       return;
@@ -351,7 +351,7 @@ bool DbTreeModel::refresh_from_database(const FoundSet& found_set)
       m_data_model_columns_count = m_columns_count;
 
       std::cerr << G_STRFUNC << ": error executing SQL. SQL query: " << std::endl;
-      std::cerr << "  " << Utils::sqlbuilder_get_full_query(sql_query) << std::endl;
+      std::cerr << G_STRFUNC << ":   " << Utils::sqlbuilder_get_full_query(sql_query) << std::endl;
       ConnectionPool::handle_error_cerr_only();
       return false; //No records were found.
     }
diff --git a/glom/mode_design/dialog_database_preferences.cc b/glom/mode_design/dialog_database_preferences.cc
index da7ee0b..71c03a8 100644
--- a/glom/mode_design/dialog_database_preferences.cc
+++ b/glom/mode_design/dialog_database_preferences.cc
@@ -285,7 +285,7 @@ void Dialog_Database_Preferences::on_button_test_script()
 
   if(!error_message.empty())
   {
-    std::cerr << "Python Error: " << error_message << std::endl;
+    std::cerr << G_STRFUNC << ": Python Error: " << error_message << std::endl;
   }
 }
 
diff --git a/glom/mode_design/iso_codes.cc b/glom/mode_design/iso_codes.cc
index 3b3a05e..d3ef4d9 100644
--- a/glom/mode_design/iso_codes.cc
+++ b/glom/mode_design/iso_codes.cc
@@ -91,7 +91,7 @@ type_list_currencies get_list_of_currency_symbols()
 #ifdef LIBXMLCPP_EXCEPTIONS_ENABLED
     catch(const std::exception& ex)
     {
-      std::cerr << "Exception while parsing iso codes (currencies): " << ex.what() << std::endl;
+      std::cerr << G_STRFUNC << ": Exception while parsing iso codes (currencies): " << ex.what() << 
std::endl;
     }
 #endif // LIBXMLCPP_EXCEPTIONS_ENABLED
   }
@@ -200,7 +200,7 @@ Glib::ustring get_locale_name(const Glib::ustring& locale_id)
 #ifdef LIBXMLCPP_EXCEPTIONS_ENABLED
     catch(const std::exception& ex)
     {
-      std::cerr << "Exception while parsing iso codes (locales): " << ex.what() << std::endl;
+      std::cerr << G_STRFUNC << ": Exception while parsing iso codes (locales): " << ex.what() << std::endl;
     }
 #endif // LIBXMLCPP_EXCEPTIONS_ENABLED
 
@@ -254,7 +254,7 @@ Glib::ustring get_locale_name(const Glib::ustring& locale_id)
 #ifdef LIBXMLCPP_EXCEPTIONS_ENABLED
     catch(const std::exception& ex)
     {
-      std::cerr << "Exception while parsing iso codes (locales): " << ex.what() << std::endl;
+      std::cerr << G_STRFUNC << ": Exception while parsing iso codes (locales): " << ex.what() << std::endl;
     }
 #endif // LIBXMLCPP_EXCEPTIONS_ENABLED
 
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_line.cc 
b/glom/mode_design/layout/layout_item_dialogs/dialog_line.cc
index 9fa1271..30880b7 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_line.cc
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_line.cc
@@ -83,7 +83,7 @@ sharedptr<LayoutItem_Line> Dialog_Line::get_line() const
 
   if(!result)
   {
-    std::cerr << ": result is null" << std::endl;
+    std::cerr << G_STRFUNC << ": : result is null" << std::endl;
     return result;
   }
 
diff --git a/glom/mode_design/relationships_overview/window_relationships_overview.cc 
b/glom/mode_design/relationships_overview/window_relationships_overview.cc
index 18a2e9b..74870bc 100644
--- a/glom/mode_design/relationships_overview/window_relationships_overview.cc
+++ b/glom/mode_design/relationships_overview/window_relationships_overview.cc
@@ -388,7 +388,7 @@ void Window_RelationshipsOverview::print_or_preview(Gtk::PrintOperationAction pr
   catch(const Gtk::PrintError& ex)
   {
     //See documentation for exact Gtk::PrintError error codes.
-    std::cerr << "An error occurred while trying to run a print operation:"
+    std::cerr << G_STRFUNC << ": An error occurred while trying to run a print operation:"
         << ex.what() << std::endl;
   }
 }
diff --git a/glom/mode_design/report_layout/dialog_layout_report.cc 
b/glom/mode_design/report_layout/dialog_layout_report.cc
index 214eec7..dd203fd 100644
--- a/glom/mode_design/report_layout/dialog_layout_report.cc
+++ b/glom/mode_design/report_layout/dialog_layout_report.cc
@@ -519,7 +519,7 @@ Gtk::TreeView* Dialog_Layout_Report::get_selected_treeview()
       return m_treeview_parts_footer;
     default:
     {
-      std::cerr << "Dialog_Layout_Report::get_selected_treeview(): Unrecognised current notebook page:"  << 
m_notebook_parts->get_current_page() << std::endl;
+      std::cerr << G_STRFUNC << ": Dialog_Layout_Report::get_selected_treeview(): Unrecognised current 
notebook page:"  << m_notebook_parts->get_current_page() << std::endl;
       return 0;
     }
   }
diff --git a/glom/mode_design/users/dialog_groups_list.cc b/glom/mode_design/users/dialog_groups_list.cc
index 697cd1a..cd24718 100644
--- a/glom/mode_design/users/dialog_groups_list.cc
+++ b/glom/mode_design/users/dialog_groups_list.cc
@@ -257,13 +257,13 @@ void Dialog_GroupsList::on_button_group_new()
 
   if(group_name.empty())
   {
-    std::cerr << ": group_name is empty" << std::endl;
+    std::cerr << G_STRFUNC << ": : group_name is empty" << std::endl;
     return;
   }
 
   if(!DbUtils::add_group(get_document(), group_name))
   {
-    std::cerr << ": DbUtils::add_group() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": : DbUtils::add_group() failed." << std::endl;
   }
 
   fill_group_list();
diff --git a/glom/print_layout/print_layout_utils.cc b/glom/print_layout/print_layout_utils.cc
index 47c06df..ec21e0f 100644
--- a/glom/print_layout/print_layout_utils.cc
+++ b/glom/print_layout/print_layout_utils.cc
@@ -437,7 +437,7 @@ void do_print_layout(const sharedptr<const PrintLayout>& print_layout, const Fou
   catch(const Gtk::PrintError& ex)
   {
     //See documentation for exact Gtk::PrintError error codes.
-    std::cerr << "An error occurred while trying to run a print operation:"
+    std::cerr << G_STRFUNC << ": An error occurred while trying to run a print operation:"
         << ex.what() << std::endl;
   }
 }
diff --git a/glom/python_embed/glom_python.cc b/glom/python_embed/glom_python.cc
index a8f470f..61ea618 100644
--- a/glom/python_embed/glom_python.cc
+++ b/glom/python_embed/glom_python.cc
@@ -91,7 +91,7 @@ static Glib::ustring get_traceback()
 
   if(!traceback)
   {
-    std::cerr << "traceback = 0" << std::endl;
+    std::cerr << G_STRFUNC << ": traceback = 0" << std::endl;
   }
 
   PyErr_NormalizeException(&type, &value, &traceback);
@@ -118,7 +118,7 @@ static Glib::ustring get_traceback()
 
 static void ShowTrace()
 {
-    std::cerr << "Glom: Python Error:" << std::endl << get_traceback() << std::endl;
+    std::cerr << G_STRFUNC << ": Glom: Python Error:" << std::endl << get_traceback() << std::endl;
 
 }
 
@@ -134,13 +134,13 @@ static boost::python::object import_module(const char* name)
   }
   catch(const boost::python::error_already_set& ex)
   {
-    std::cerr << "boost::python::import() failed while importing module: "<< name << std::endl;
+    std::cerr << G_STRFUNC << ": boost::python::import() failed while importing module: "<< name << 
std::endl;
     ShowTrace();
   }
 
   if(module_glom == boost::python::object())
   {
-    std::cerr << "Glom: A python import of a module failed: " << name << std::endl;
+    std::cerr << G_STRFUNC << ": Glom: A python import of a module failed: " << name << std::endl;
   }
 
   return module_glom;
@@ -273,7 +273,7 @@ static boost::python::object glom_python_call(Field::glom_field_type result_type
   }
   catch(const boost::python::error_already_set& ex)
   {
-    std::cerr << "Glom: boost::python::eval() threw boost::python_error_already_set." << std::endl;
+    std::cerr << G_STRFUNC << ": Glom: boost::python::eval() threw boost::python_error_already_set." << 
std::endl;
     HandlePythonError();
   }
   */
@@ -344,9 +344,9 @@ static boost::python::object glom_python_call(Field::glom_field_type result_type
   }
   catch(const boost::python::error_already_set& ex)
   {
-    std::cerr << "Glom: Exception caught from pFunc(objRecord). func_name=" << std::endl << func_name << 
std::endl;
+    std::cerr << G_STRFUNC << ": Glom: Exception caught from pFunc(objRecord). func_name=" << std::endl << 
func_name << std::endl;
     error_message = get_traceback();
-    //std::cerr << "  traceback=" << error_message << std::endl;
+    //std::cerr << G_STRFUNC << ":   traceback=" << error_message << std::endl;
   }
 
   if(!(pyResultCpp.ptr()))
@@ -496,7 +496,7 @@ Gnome::Gda::Value glom_evaluate_python_function_implementation(Field::glom_field
       }
       catch(const boost::python::error_already_set& ex)
       {
-        std::cerr << "Glom: Exception caught from boost::python::extract() while converting result to a 
const char*." << std::endl;
+        std::cerr << G_STRFUNC << ": Glom: Exception caught from boost::python::extract() while converting 
result to a const char*." << std::endl;
         ShowTrace();
         return valueResult;
       }
diff --git a/glom/utility_widgets/imageglom.cc b/glom/utility_widgets/imageglom.cc
index d2e45c7..13344ac 100644
--- a/glom/utility_widgets/imageglom.cc
+++ b/glom/utility_widgets/imageglom.cc
@@ -574,7 +574,7 @@ static void make_file_read_only(const Glib::ustring& uri)
   
   if(!file_info)
   {
-    std::cerr << ": file_info is null" << std::endl;
+    std::cerr << G_STRFUNC << ": : file_info is null" << std::endl;
     return;
   }
   
@@ -601,7 +601,7 @@ Glib::ustring ImageGlom::save_to_temp_file(bool show_progress)
   Glib::ustring uri = Utils::get_temp_file_uri("glom_image");
   if(uri.empty())
   {
-    std::cerr << ": uri is empty." << std::endl;
+    std::cerr << G_STRFUNC << ": : uri is empty." << std::endl;
   }
   
   bool saved = false;
diff --git a/glom/utility_widgets/layoutwidgetutils.cc b/glom/utility_widgets/layoutwidgetutils.cc
index f95f23e..31da622 100644
--- a/glom/utility_widgets/layoutwidgetutils.cc
+++ b/glom/utility_widgets/layoutwidgetutils.cc
@@ -69,7 +69,7 @@ void LayoutWidgetUtils::on_menu_delete_activate()
   if(!parent)
   {
     // Should never happen!
-    std::cerr << "LayoutWidgetUtils is no Gtk::Widget" << std::endl;
+    std::cerr << G_STRFUNC << ": LayoutWidgetUtils is no Gtk::Widget" << std::endl;
     return;
   }
 
diff --git a/glom/utils_ui.cc b/glom/utils_ui.cc
index b38ee7e..3f860bb 100644
--- a/glom/utils_ui.cc
+++ b/glom/utils_ui.cc
@@ -262,7 +262,7 @@ Glib::RefPtr<Gdk::Pixbuf> Utils::get_pixbuf_for_gda_value(const Gnome::Gda::Valu
       catch(const Gdk::PixbufError& ex)
       {
         refPixbufLoader.reset();
-        std::cerr << "PixbufLoader::create failed: " << ex.what() << std::endl;
+        std::cerr << G_STRFUNC << ": PixbufLoader::create failed: " << ex.what() << std::endl;
       }
 
       if(refPixbufLoader)
diff --git a/tests/glade_toplevels_instantiation.cc b/tests/glade_toplevels_instantiation.cc
index 9dc1f24..1a2ca86 100644
--- a/tests/glade_toplevels_instantiation.cc
+++ b/tests/glade_toplevels_instantiation.cc
@@ -38,8 +38,8 @@ static bool attempt_instantiation(const std::string& filepath, const xmlpp::Elem
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << "Exception from Gtk::Builder::create_from_file() with id=" << id << " from file " << 
filepath << std::endl;
-    std::cerr << "  Error: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Exception from Gtk::Builder::create_from_file() with id=" << id << " from 
file " << filepath << std::endl;
+    std::cerr << G_STRFUNC << ":   Error: " << ex.what() << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -60,7 +60,7 @@ static bool attempt_instantiation(const std::string& filepath, const xmlpp::Elem
   else
   {
     //We try to avoid using non-window top-level widgets in Glom.
-    std::cerr << "Non-window top-level object in Glade file (unexpected by Glom): id=" << id << " from file 
" << filepath << std::endl;
+    std::cerr << G_STRFUNC << ": Non-window top-level object in Glade file (unexpected by Glom): id=" << id 
<< " from file " << filepath << std::endl;
 
     //But let's try this anyway:
     Glib::RefPtr<Glib::Object> object = builder->get_object(id);
@@ -70,7 +70,7 @@ static bool attempt_instantiation(const std::string& filepath, const xmlpp::Elem
 
   if(!widget)
   {
-    std::cerr << "Failed to instantiate object with id=" << id << " from file " << filepath << std::endl;
+    std::cerr << G_STRFUNC << ": Failed to instantiate object with id=" << id << " from file " << filepath 
<< std::endl;
     return false;
   }
 
@@ -78,7 +78,7 @@ static bool attempt_instantiation(const std::string& filepath, const xmlpp::Elem
   //because applications generally want to separate instantiation from showing.
   if(widget->get_visible())
   {
-     std::cerr << "Top-level window is visible by default (unwanted by Glom): id=" << id << " from file " << 
filepath << std::endl;
+     std::cerr << G_STRFUNC << ": Top-level window is visible by default (unwanted by Glom): id=" << id << " 
from file " << filepath << std::endl;
      return false;
   }
 
@@ -99,7 +99,7 @@ int main(int argc, char* argv[])
     filepath = argv[1]; //Allow the user to specify a different XML file to parse.
   else
   {
-    std::cerr << "Usage: glade_toplevels_instantiation filepath" << std::endl;
+    std::cerr << G_STRFUNC << ": Usage: glade_toplevels_instantiation filepath" << std::endl;
     return EXIT_FAILURE;
   }
 
diff --git a/tests/import/test_parsing.cc b/tests/import/test_parsing.cc
index 6faa4ad..5721fd5 100644
--- a/tests/import/test_parsing.cc
+++ b/tests/import/test_parsing.cc
@@ -59,7 +59,7 @@ bool check_tokens(const std::string& regex)
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << "Glib::Regex::create() failed: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Glib::Regex::create() failed: " << ex.what() << std::endl;
     return false;
   }
 
diff --git a/tests/python/test_python_execute_func.cc b/tests/python/test_python_execute_func.cc
index 8c6f5b5..b13f89e 100644
--- a/tests/python/test_python_execute_func.cc
+++ b/tests/python/test_python_execute_func.cc
@@ -26,12 +26,12 @@ int main()
   }
   catch(const std::exception& ex)
   {
-    std::cerr << "Exception: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Exception: " << ex.what() << std::endl;
     return EXIT_FAILURE;
   }
   catch(const boost::python::error_already_set& ex)
   {
-    std::cerr << "Exception: boost::python::error_already_set" << std::endl;
+    std::cerr << G_STRFUNC << ": Exception: boost::python::error_already_set" << std::endl;
     return EXIT_FAILURE;
   }
 
diff --git a/tests/python/test_python_execute_func_bad_syntax.cc 
b/tests/python/test_python_execute_func_bad_syntax.cc
index ee7a031..fc5f9d6 100644
--- a/tests/python/test_python_execute_func_bad_syntax.cc
+++ b/tests/python/test_python_execute_func_bad_syntax.cc
@@ -28,12 +28,12 @@ int main()
   }
   catch(const std::exception& ex)
   {
-    std::cerr << "Exception: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Exception: " << ex.what() << std::endl;
     return EXIT_FAILURE;
   }
   catch(const boost::python::error_already_set& ex)
   {
-    std::cerr << "Exception: boost::python::error_already_set" << std::endl;
+    std::cerr << G_STRFUNC << ": Exception: boost::python::error_already_set" << std::endl;
     return EXIT_FAILURE;
   }
 
diff --git a/tests/python/test_python_execute_func_change_result_type.cc 
b/tests/python/test_python_execute_func_change_result_type.cc
index e09edba..2aa4ba4 100644
--- a/tests/python/test_python_execute_func_change_result_type.cc
+++ b/tests/python/test_python_execute_func_change_result_type.cc
@@ -28,12 +28,12 @@ int main()
   }
   catch(const std::exception& ex)
   {
-    std::cerr << "Exception: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Exception: " << ex.what() << std::endl;
     return EXIT_FAILURE;
   }
   catch(const boost::python::error_already_set& ex)
   {
-    std::cerr << "Exception: boost::python::error_already_set" << std::endl;
+    std::cerr << G_STRFUNC << ": Exception: boost::python::error_already_set" << std::endl;
     return EXIT_FAILURE;
   }
 
diff --git a/tests/python/test_python_execute_func_with_record.cc 
b/tests/python/test_python_execute_func_with_record.cc
index 76b471f..f3ba28c 100644
--- a/tests/python/test_python_execute_func_with_record.cc
+++ b/tests/python/test_python_execute_func_with_record.cc
@@ -61,7 +61,7 @@ int main()
 
   if(!test)
   {
-    std::cerr << "Document::load() failed with failure_code=" << failure_code << std::endl;
+    std::cerr << G_STRFUNC << ": Document::load() failed with failure_code=" << failure_code << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -75,7 +75,7 @@ int main()
     connection_pool->startup( sigc::ptr_fun(&on_startup_progress) );
   if(started != Glom::ConnectionPool::Backend::STARTUPERROR_NONE)
   {
-    std::cerr << "connection_pool->startup(): result=" << started << std::endl;
+    std::cerr << G_STRFUNC << ": connection_pool->startup(): result=" << started << std::endl;
   }
   g_assert(started == Glom::ConnectionPool::Backend::STARTUPERROR_NONE);
 
@@ -107,12 +107,12 @@ int main()
   }
   catch(const std::exception& ex)
   {
-    std::cerr << "Exception: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Exception: " << ex.what() << std::endl;
     return EXIT_FAILURE;
   }
   catch(const boost::python::error_already_set& ex)
   {
-    std::cerr << "Exception: boost::python::error_already_set" << std::endl;
+    std::cerr << G_STRFUNC << ": Exception: boost::python::error_already_set" << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -121,7 +121,7 @@ int main()
   //Check that there was no python error:
   if(!error_message.empty())
   {
-    std::cerr << "Python error: " << error_message << std::endl;
+    std::cerr << G_STRFUNC << ": Python error: " << error_message << std::endl;
     return EXIT_FAILURE;
   }
 
diff --git a/tests/python/test_python_execute_script.cc b/tests/python/test_python_execute_script.cc
index 93caf65..ee6393a 100644
--- a/tests/python/test_python_execute_script.cc
+++ b/tests/python/test_python_execute_script.cc
@@ -93,18 +93,18 @@ int main()
   }
   catch(const std::exception& ex)
   {
-    std::cerr << "Exception: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Exception: " << ex.what() << std::endl;
     return EXIT_FAILURE;
   }
   catch(const boost::python::error_already_set& ex)
   {
-    std::cerr << "Exception: boost::python::error_already_set" << std::endl;
+    std::cerr << G_STRFUNC << ": Exception: boost::python::error_already_set" << std::endl;
     return EXIT_FAILURE;
   }
 
   if(!error_message.empty())
   {
-    std::cerr << "Python Error: " << error_message << std::endl;
+    std::cerr << G_STRFUNC << ": Python Error: " << error_message << std::endl;
   }
 
   g_assert(error_message.empty());
diff --git a/tests/test_document_load.cc b/tests/test_document_load.cc
index 72271cd..c0d5c02 100644
--- a/tests/test_document_load.cc
+++ b/tests/test_document_load.cc
@@ -161,7 +161,7 @@ int main()
 
   if(!test)
   {
-    std::cerr << "Document::load() failed with failure_code=" << failure_code << std::endl;
+    std::cerr << G_STRFUNC << ": Document::load() failed with failure_code=" << failure_code << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -273,7 +273,7 @@ int main()
   const std::vector<Glib::ustring> module_names = document.get_library_module_names();
   if(!module_names.empty()) //TODO: Test a document that actually has some?
   {
-    std::cerr << "Failure: Unexpected library module names." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Unexpected library module names." << std::endl;
     return false;
   }
 
@@ -283,32 +283,32 @@ int main()
     document.get_print_layout_names("contacts");
   if(print_layout_names.size() != 1)
   {
-    std::cerr << "Failure: Unexpected number of print layouts." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Unexpected number of print layouts." << std::endl;
     return false;
   }
 
   if(!contains(print_layout_names, "contact_details"))
   {
-    std::cerr << "Failure: Could not find the expected print layout name." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Could not find the expected print layout name." << std::endl;
     return false;
   }
   
   const Glom::sharedptr<const Glom::PrintLayout> print_layout = document.get_print_layout("contacts", 
"contact_details");
   if(!print_layout)
   {
-    std::cerr << "Failure: Could not get an expected print layout." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Could not get an expected print layout." << std::endl;
     return false;
   }
   
   if(print_layout->get_title_original() != "Contact Details")
   {
-    std::cerr << "Failure: Unexpected print layout title." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Unexpected print layout title." << std::endl;
     return false;
   }
   
   if(!print_layout->get_layout_group())
   {
-    std::cerr << "Failure: The print layout has no layout group." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The print layout has no layout group." << std::endl;
     return false;
   }
 
@@ -317,32 +317,32 @@ int main()
     document.get_report_names("contacts");
   if(report_names.size() != 2)
   {
-    std::cerr << "Failure: Unexpected number of reports." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Unexpected number of reports." << std::endl;
     return false;
   }
 
   if(!contains(report_names, "by_country"))
   {
-    std::cerr << "Failure: Could not find the expected report name." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Could not find the expected report name." << std::endl;
     return false;
   }
 
   const Glom::sharedptr<const Glom::Report> report = document.get_report("contacts", "by_country_by_town");
   if(!report)
   {
-    std::cerr << "Failure: Could not get an expected report." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Could not get an expected report." << std::endl;
     return false;
   }
   
   if(report->get_title_original() != "By Country, By Town")
   {
-    std::cerr << "Failure: Unexpected report title." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Unexpected report title." << std::endl;
     return false;
   }
   
   if(!report->get_layout_group())
   {
-    std::cerr << "Failure: The report has no layout group." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The report has no layout group." << std::endl;
     return false;
   }
 
@@ -367,13 +367,13 @@ int main()
   //Test navigation:
   if(!needs_navigation(document, "scenes", "location_id"))
   {
-    std::cerr << "Failure: DbUtils::layout_field_should_have_navigation() did not return the expected 
result." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: DbUtils::layout_field_should_have_navigation() did not return the 
expected result." << std::endl;
     return false;
   }
 
   if(needs_navigation(document, "scenes", "description"))
   {
-    std::cerr << "Failure: DbUtils::layout_field_should_have_navigation() did not return the expected 
result." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: DbUtils::layout_field_should_have_navigation() did not return the 
expected result." << std::endl;
     return false;
   }
 
@@ -386,7 +386,7 @@ int main()
     get_portal_from_details_layout(document, "scenes", portal_relationship_name);
   if(!portal)
   {
-    std::cerr << "Failure: Could not get the portal from the layout." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Could not get the portal from the layout." << std::endl;
     return false;
   }
 
@@ -396,19 +396,19 @@ int main()
 
   if(navigation_table_name != "characters")
   {
-    std::cerr << "Failure: get_suitable_table_to_view_details() returned an unexpected table name: " << 
navigation_table_name << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: get_suitable_table_to_view_details() returned an unexpected table 
name: " << navigation_table_name << std::endl;
     return false;
   }
 
   if(!navigation_relationship)
   {
-    std::cerr << "Failure: get_suitable_table_to_view_details() returned an empty navigation_relationship." 
<< std::endl;
+    std::cerr << G_STRFUNC << ": Failure: get_suitable_table_to_view_details() returned an empty 
navigation_relationship." << std::endl;
     return false;
   }
 
   if(navigation_relationship->get_relationship_name() != "cast")
   {
-    std::cerr << "Failure: get_suitable_table_to_view_details() returned an unexpected 
navigation_relationship name: " << navigation_relationship->get_relationship_name() << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: get_suitable_table_to_view_details() returned an unexpected 
navigation_relationship name: " << navigation_relationship->get_relationship_name() << std::endl;
     return false;
   }
 
diff --git a/tests/test_document_load_and_change.cc b/tests/test_document_load_and_change.cc
index 8798f0f..98830fc 100644
--- a/tests/test_document_load_and_change.cc
+++ b/tests/test_document_load_and_change.cc
@@ -42,7 +42,7 @@ static bool field_is_on_a_layout(Glom::Document& document, const Glib::ustring&
       const Glom::sharedptr<Glom::LayoutGroup> group = *iter;
       if(group->has_field(layout_table_name, table_name, field_name))
       {
-        //std::cerr << "Failure: The field is still used on a layout for table: " << layout_table_name << 
std::endl;
+        //std::cerr << G_STRFUNC << ": Failure: The field is still used on a layout for table: " << 
layout_table_name << std::endl;
         return true;
       }
     }
@@ -91,7 +91,7 @@ int main()
 
   if(!test)
   {
-    std::cerr << "Document::load() failed with failure_code=" << failure_code << std::endl;
+    std::cerr << G_STRFUNC << ": Document::load() failed with failure_code=" << failure_code << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -107,14 +107,14 @@ int main()
   //Check that the original field name is not known to the document:
   if(document.get_field(table_name, field_name_original))
   {
-    std::cerr << "Failure: The document should have forgotten about the original field name." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The document should have forgotten about the original field name." 
<< std::endl;
     return false;
   }
 
   //Check that the new field name is known to the document:
   if(!(document.get_field(table_name, field_name_new)))
   {
-    std::cerr << "Failure: The document does not know about the new field name." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The document does not know about the new field name." << std::endl;
     return false;
   }
 
@@ -122,20 +122,20 @@ int main()
   Glom::sharedptr<const Glom::Relationship> relationship = document.get_relationship("invoice_lines", 
"products");
   if(!relationship)
   {
-    std::cerr << "Failure: The relationship could not be found in the document." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The relationship could not be found in the document." << std::endl;
     return false;
   }
 
   if(relationship->get_to_field() == field_name_original)
   {
-    std::cerr << "Failure: The relationship still uses the original field name." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The relationship still uses the original field name." << std::endl;
     return false;
   }
 
   //Check that the original field name is no longer used on a layout:
   if(field_is_on_a_layout(document, table_name, field_name_original))
   {
-    std::cerr << "Failure: The original field name is still used on a layout." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The original field name is still used on a layout." << std::endl;
     return false;
   }
 
@@ -148,13 +148,13 @@ int main()
       relationship_name_original, relationship_name_new);
     if(document.get_relationship(table_name, relationship_name_original))
     {
-      std::cerr << "Failure: The original relationship name still exists." << std::endl;
+      std::cerr << G_STRFUNC << ": Failure: The original relationship name still exists." << std::endl;
       return false;
     }
 
     if(!document.get_relationship(table_name, relationship_name_new))
     {
-      std::cerr << "Failure: The new relationship name does not exist." << std::endl;
+      std::cerr << G_STRFUNC << ": Failure: The new relationship name does not exist." << std::endl;
       return false;
     }
 
@@ -164,7 +164,7 @@ int main()
     g_assert(field_on_layout);
     if(field_on_layout->get_relationship_name() != relationship_name_new)
     {
-      std::cerr << "Failure: A layout item does not use the new relationship name as expected." << std::endl;
+      std::cerr << G_STRFUNC << ": Failure: A layout item does not use the new relationship name as 
expected." << std::endl;
       return false;
     }
   }
@@ -173,7 +173,7 @@ int main()
   document.remove_field("publisher", "publisher_id");
   if(field_is_on_a_layout(document, "publisher", "publisher_id"))
   {
-    std::cerr << "Failure: The removed field name is still used on a layout." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The removed field name is still used on a layout." << std::endl;
     return false;
   }
   
@@ -182,7 +182,7 @@ int main()
   relationship = document.get_relationship("invoice_lines", "products");
   if(relationship)
   {
-    std::cerr << "Failure: The removed relationship still exists." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The removed relationship still exists." << std::endl;
     return false;
   }
   
@@ -191,27 +191,27 @@ int main()
   document.change_table_name("invoice_lines", table_renamed);
   if(document.get_table("invoice_lines"))
   {
-    std::cerr << "Failure: The renamed table still exists." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The renamed table still exists." << std::endl;
     return false;
   }
   
   relationship = document.get_relationship("invoices", "invoice_lines");
   if(!relationship)
   {
-    std::cerr << "Failure: The expected relationship does not exist." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The expected relationship does not exist." << std::endl;
     return false;
   }
 
   if(relationship->get_to_table() != table_renamed)
   {
-    std::cerr << "Failure: The relationship's to_table does have been renamed." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The relationship's to_table does have been renamed." << std::endl;
     return false;
   }
   
   document.remove_table("products");
   if(document.get_table("products"))
   {
-    std::cerr << "Failure: The removed table still exists." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The removed table still exists." << std::endl;
     return false;
   }
 
@@ -221,7 +221,7 @@ int main()
     document.get_print_layout("contacts", "contact_details");
   if(!print_layout)
   {
-    std::cerr << "Failure: Could not get an expected print layout." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Could not get an expected print layout." << std::endl;
     return false;
   }
   
@@ -230,7 +230,7 @@ int main()
     document.get_print_layout("contacts", "contact_details");
   if(print_layout)
   {
-    std::cerr << "Failure: The removed print layotu still exists." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The removed print layotu still exists." << std::endl;
     return false;
   }
   
diff --git a/tests/test_document_load_and_save.cc b/tests/test_document_load_and_save.cc
index 58e6f29..a30221f 100644
--- a/tests/test_document_load_and_save.cc
+++ b/tests/test_document_load_and_save.cc
@@ -55,14 +55,14 @@ static bool validate_glom_file(const Glib::ustring& uri, const std::string& dtd_
   }
   catch(const xmlpp::validity_error& ex)
   {
-    std::cerr << "Exception caught while validating file: " << ex.what() << std::endl;
-    std::cerr << "  uri: " << uri << std::endl;
+    std::cerr << G_STRFUNC << ": Exception caught while validating file: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ":   uri: " << uri << std::endl;
     return false;
   }
   catch(const xmlpp::parse_error& ex)
   {
-    std::cerr << "Exception caught while validating file: " << ex.what() << std::endl;
-    std::cerr << "  uri: " << uri << std::endl;
+    std::cerr << G_STRFUNC << ": Exception caught while validating file: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ":   uri: " << uri << std::endl;
     return false;
   }
 
@@ -75,7 +75,7 @@ int main(int argc, char* argv[])
 
   if(argc <= 2 )
   {
-    std::cerr << "Usage: test_document_load_and_save filepath dtd_filepath" << std::endl;
+    std::cerr << G_STRFUNC << ": Usage: test_document_load_and_save filepath dtd_filepath" << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -99,7 +99,7 @@ int main(int argc, char* argv[])
 
   if(!loaded)
   {
-    std::cerr << "Document::load() failed with failure_code=" << failure_code << std::endl;
+    std::cerr << G_STRFUNC << ": Document::load() failed with failure_code=" << failure_code << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -112,7 +112,7 @@ int main(int argc, char* argv[])
   const bool saved = document.save();
   if(!saved)
   {
-    std::cerr << "Document::save() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Document::save() failed." << std::endl;
     return EXIT_FAILURE;
   }
 
diff --git a/tests/test_document_load_image.cc b/tests/test_document_load_image.cc
index 7c01ebc..7ec8736 100644
--- a/tests/test_document_load_image.cc
+++ b/tests/test_document_load_image.cc
@@ -60,7 +60,7 @@ int main()
 
   if(!test)
   {
-    std::cerr << "Document::load() failed with failure_code=" << failure_code << std::endl;
+    std::cerr << G_STRFUNC << ": Document::load() failed with failure_code=" << failure_code << std::endl;
     return EXIT_FAILURE;
   }
 
diff --git a/tests/test_document_load_translations.cc b/tests/test_document_load_translations.cc
index 0630feb..62aeef8 100644
--- a/tests/test_document_load_translations.cc
+++ b/tests/test_document_load_translations.cc
@@ -237,7 +237,7 @@ int main()
 
   if(!test)
   {
-    std::cerr << "Document::load() failed with failure_code=" << failure_code << std::endl;
+    std::cerr << G_STRFUNC << ": Document::load() failed with failure_code=" << failure_code << std::endl;
     return EXIT_FAILURE;
   }
 
diff --git a/tests/test_fake_connection.cc b/tests/test_fake_connection.cc
index e0f9f61..3cdd358 100644
--- a/tests/test_fake_connection.cc
+++ b/tests/test_fake_connection.cc
@@ -57,7 +57,7 @@ int main()
 
   if(!test)
   {
-    std::cerr << "Document::load() failed with failure_code=" << failure_code << std::endl;
+    std::cerr << G_STRFUNC << ": Document::load() failed with failure_code=" << failure_code << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -87,7 +87,7 @@ int main()
   g_assert(!query.empty());
   if(query.find("album_id") == Glib::ustring::npos)
   {
-    std::cerr << "Failed: The query did not contain an expected field name." << std::endl;
+    std::cerr << G_STRFUNC << ": Failed: The query did not contain an expected field name." << std::endl;
     return EXIT_FAILURE;
   }
 
diff --git a/tests/test_glade_derived_instantiation.cc b/tests/test_glade_derived_instantiation.cc
index 84ad1c1..ef9580f 100644
--- a/tests/test_glade_derived_instantiation.cc
+++ b/tests/test_glade_derived_instantiation.cc
@@ -87,7 +87,7 @@ bool instantiate_widget()
   Glom::Utils::get_glade_widget_derived_with_warning(widget);
   if(!widget)
   {
-    std::cerr << "Test: Failed to instantiate widget of type: " << typeid(T_Widget).name() << std::endl;
+    std::cerr << G_STRFUNC << ": Test: Failed to instantiate widget of type: " << typeid(T_Widget).name() << 
std::endl;
     exit(EXIT_FAILURE); //Make sure that our test case fails.
     return false;
   }
@@ -102,10 +102,10 @@ bool instantiate_widget()
   if( (allocation.get_height() > GLOM_MAX_WINDOW_HEIGHT) ||
     (allocation.get_width() > GLOM_MAX_WINDOW_WIDTH))
   {
-    std::cerr << "Test: The window/widget is too big: " << T_Widget::glade_id << std::endl;
-    std::cerr << "  height=" << allocation.get_height() << std::endl; 
-    std::cerr << "  width=" << allocation.get_width() << std::endl;
-    std::cerr << "  (Ignored, though it should be fixed.)" << std::endl; 
+    std::cerr << G_STRFUNC << ": Test: The window/widget is too big: " << T_Widget::glade_id << std::endl;
+    std::cerr << G_STRFUNC << ":   height=" << allocation.get_height() << std::endl; 
+    std::cerr << G_STRFUNC << ":   width=" << allocation.get_width() << std::endl;
+    std::cerr << G_STRFUNC << ":   (Ignored, though it should be fixed.)" << std::endl; 
     //TODO: Uncomment this when all the windows are small enough: exit(EXIT_FAILURE); //Make sure that our 
test case fails.
   }
   
diff --git a/tests/test_parsing_time.cc b/tests/test_parsing_time.cc
index 34bc575..0ed5936 100644
--- a/tests/test_parsing_time.cc
+++ b/tests/test_parsing_time.cc
@@ -17,7 +17,7 @@ int main()
     Glom::Conversions::parse_time(time_text_input, success);
   if(!success)
   {
-    std::cerr << "Failed: parse_time() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Failed: parse_time() failed." << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -27,7 +27,7 @@ int main()
 
   if(!success)
   {
-    std::cerr << "Failed: parse_value() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Failed: parse_value() failed." << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -36,13 +36,13 @@ int main()
 
   if(parsed_time.hour != 13)
   {
-    std::cerr << "Failed: The parsed hour was " <<  parsed_time.hour << " instead of 13" << std::endl;
+    std::cerr << G_STRFUNC << ": Failed: The parsed hour was " <<  parsed_time.hour << " instead of 13" << 
std::endl;
     return EXIT_FAILURE; //Failed.
   }
 
   if(parsed_time.minute != 0)
   {
-    std::cerr << "Failed: The parsed minute was " <<  parsed_time.minute << " instead of 0" << std::endl;
+    std::cerr << G_STRFUNC << ": Failed: The parsed minute was " <<  parsed_time.minute << " instead of 0" 
<< std::endl;
     return EXIT_FAILURE;
   }
 
diff --git a/tests/test_script_check_for_problems.cc b/tests/test_script_check_for_problems.cc
index 344f350..65ab148 100644
--- a/tests/test_script_check_for_problems.cc
+++ b/tests/test_script_check_for_problems.cc
@@ -30,7 +30,7 @@ int main()
 
   if(!Glom::Utils::script_check_for_pygtk2(script))
   {
-    std::cerr << "script_check_for_pygtk2() failed unexpectedly." << std::endl;
+    std::cerr << G_STRFUNC << ": script_check_for_pygtk2() failed unexpectedly." << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -39,7 +39,7 @@ int main()
 
   if(!Glom::Utils::script_check_for_pygtk2(script))
   {
-    std::cerr << "script_check_for_pygtk2() failed unexpectedly." << std::endl;
+    std::cerr << G_STRFUNC << ": script_check_for_pygtk2() failed unexpectedly." << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -50,7 +50,7 @@ int main()
 
   if(Glom::Utils::script_check_for_pygtk2(script))
   {
-    std::cerr << "script_check_for_pygtk2() succeeded unexpectedly." << std::endl;
+    std::cerr << G_STRFUNC << ": script_check_for_pygtk2() succeeded unexpectedly." << std::endl;
     return EXIT_FAILURE;
   }
 
diff --git a/tests/test_selfhosting_new_empty.cc b/tests/test_selfhosting_new_empty.cc
index 7536da9..8238eca 100644
--- a/tests/test_selfhosting_new_empty.cc
+++ b/tests/test_selfhosting_new_empty.cc
@@ -31,7 +31,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
 
   if(!(test_create_and_selfhost_new_database(document, hosting_mode, "test_db")))
   {
-    std::cerr << "test_create_and_selfhost_new_database() failed" << std::endl;
+    std::cerr << G_STRFUNC << ": test_create_and_selfhost_new_database() failed" << std::endl;
     return false;
   }
   
@@ -45,7 +45,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   }
   catch(const Glom::ExceptionConnection& ex)
   {
-    std::cerr << "Exception: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Exception: " << ex.what() << std::endl;
     return false;
   }
 
diff --git a/tests/test_selfhosting_new_empty_change_sysprefs.cc 
b/tests/test_selfhosting_new_empty_change_sysprefs.cc
index e6584c1..aea99f7 100644
--- a/tests/test_selfhosting_new_empty_change_sysprefs.cc
+++ b/tests/test_selfhosting_new_empty_change_sysprefs.cc
@@ -31,7 +31,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
 
   if(!(test_create_and_selfhost_new_database(document, hosting_mode, "test_db")))
   {
-    std::cerr << "test_create_and_selfhost_new_database() failed" << std::endl;
+    std::cerr << G_STRFUNC << ": test_create_and_selfhost_new_database() failed" << std::endl;
     return false;
   }
   
@@ -52,13 +52,13 @@ static bool test(Glom::Document::HostingMode hosting_mode)
       Glom::DbUtils::get_database_preferences(&document);
     if(prefs_out != prefs_in)
     {
-      std::cerr << "The System Preferences read out were not the same as those written." << std::endl;
+      std::cerr << G_STRFUNC << ": The System Preferences read out were not the same as those written." << 
std::endl;
       return false;
     }
   }
   catch(const Glom::ExceptionConnection& ex)
   {
-    std::cerr << "Exception: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Exception: " << ex.what() << std::endl;
     return false;
   }
 
diff --git a/tests/test_selfhosting_new_empty_then_users.cc b/tests/test_selfhosting_new_empty_then_users.cc
index 545a261..1d2717c 100644
--- a/tests/test_selfhosting_new_empty_then_users.cc
+++ b/tests/test_selfhosting_new_empty_then_users.cc
@@ -40,22 +40,22 @@ static bool test_add_group(const Glom::Document& document, const Glib::ustring&
 {
   if(!Glom::DbUtils::add_group(&document, group))
   {
-    std::cerr << "DbUtils::add_group() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": DbUtils::add_group() failed." << std::endl;
     return false;
   }
 
   const Glom::Privs::type_vec_strings group_list = Glom::Privs::get_database_groups();
   if(!contains(group_list, group))
   {
-    std::cerr << "Privs::get_database_groups() does not contain the expected group." << std::endl;
-    std::cerr << "  group: " << group << std::endl;
+    std::cerr << G_STRFUNC << ": Privs::get_database_groups() does not contain the expected group." << 
std::endl;
+    std::cerr << G_STRFUNC << ":   group: " << group << std::endl;
     return false;
   }
 
   const Glom::Privs::type_vec_strings user_list = Glom::Privs::get_database_users(group);
   if(!user_list.empty())
   {
-    std::cerr << "The user list is not empty as expected.." << std::endl;
+    std::cerr << G_STRFUNC << ": The user list is not empty as expected.." << std::endl;
     return false;
   }
 
@@ -67,7 +67,7 @@ static bool test_add_user(const Glom::Document& document, const Glib::ustring& u
   //Add an operator user, adding it to the group:
   if(!Glom::DbUtils::add_user(&document, user, "somepassword", group))
   {
-    std::cerr << "DbUtils::add_user() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": DbUtils::add_user() failed." << std::endl;
     test_selfhosting_cleanup();
     return false;
   }
@@ -75,9 +75,9 @@ static bool test_add_user(const Glom::Document& document, const Glib::ustring& u
   const Glom::Privs::type_vec_strings user_list = Glom::Privs::get_database_users(group);
   if(!contains(user_list, user))
   {
-    std::cerr << "Privs::get_database_users() does not contain the expected user:" << std::endl;
-    std::cerr << "  group: " << group << std::endl;
-    std::cerr << "  user: " << user << std::endl;
+    std::cerr << G_STRFUNC << ": Privs::get_database_users() does not contain the expected user:" << 
std::endl;
+    std::cerr << G_STRFUNC << ":   group: " << group << std::endl;
+    std::cerr << G_STRFUNC << ":   user: " << user << std::endl;
     return false;
   }
 
@@ -95,7 +95,7 @@ static bool change_privileges(const Glib::ustring& group_name, const Glib::ustri
   privs_new.m_delete = del;
   if(!Glom::Privs::set_table_privileges(group_name, table_name, privs_new, false))
   {
-    std::cerr << "Privs::set_table_privileges() failed for group=" << group_name << ", table_name=" << 
table_name << std::endl;
+    std::cerr << G_STRFUNC << ": Privs::set_table_privileges() failed for group=" << group_name << ", 
table_name=" << table_name << std::endl;
     return false;
   }
 
@@ -105,7 +105,7 @@ static bool change_privileges(const Glib::ustring& group_name, const Glib::ustri
     (privs_changed.m_create != privs_new.m_create) ||
     (privs_changed.m_delete != privs_new.m_delete) )
   {
-    std::cerr << "Changing and re-reading privileges failed for group=" << group_name << ", table_name=" << 
table_name << std::endl;
+    std::cerr << G_STRFUNC << ": Changing and re-reading privileges failed for group=" << group_name << ", 
table_name=" << table_name << std::endl;
     return false;
   }
 
@@ -126,7 +126,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   Glom::Document document;
     if(!(test_create_and_selfhost_new_database(document, hosting_mode, "test_db")))
   {
-    std::cerr << "test_create_and_selfhost_new_database() failed" << std::endl;
+    std::cerr << G_STRFUNC << ": test_create_and_selfhost_new_database() failed" << std::endl;
     return false;
   }
 
@@ -150,7 +150,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   {
     if(!Glom::DbUtils::create_table_with_default_fields(&document, *iter))
     {
-      std::cerr << "Failure: create_table_with_default_fields() failed." << std::endl;
+      std::cerr << G_STRFUNC << ": Failure: create_table_with_default_fields() failed." << std::endl;
       return false;
     }
   }
@@ -168,13 +168,13 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   const Glom::Privs::type_vec_strings group_list_original = Glom::Privs::get_database_groups();
   if(group_list_original.empty())
   {
-    std::cerr << "Privs::get_database_groups() returned an empty list." << std::endl;
+    std::cerr << G_STRFUNC << ": Privs::get_database_groups() returned an empty list." << std::endl;
     return false;
   }
 
   if(!contains(group_list_original, GLOM_STANDARD_GROUP_NAME_DEVELOPER))
   {
-    std::cerr << "Privs::get_database_groups() does not contain the developers group." << std::endl;
+    std::cerr << G_STRFUNC << ": Privs::get_database_groups() does not contain the developers group." << 
std::endl;
     return false;
   }
 
@@ -225,13 +225,13 @@ static bool test(Glom::Document::HostingMode hosting_mode)
         const Glom::Privileges privs = Glom::Privs::get_table_privileges(group_name, table_name);
         if(!privs.m_view)
         {
-          std::cerr << "Privs::get_table_privileges() returned an unexpected view privilege for group=" << 
group_name << ", table_name=" << table_name << std::endl;
+          std::cerr << G_STRFUNC << ": Privs::get_table_privileges() returned an unexpected view privilege 
for group=" << group_name << ", table_name=" << table_name << std::endl;
           return false;
         }
 
         if(!privs.m_edit)
         {
-          std::cerr << "Privs::get_table_privileges() returned an unexpected edit privilege for group=" << 
group_name << ", table_name=" << table_name << std::endl;
+          std::cerr << G_STRFUNC << ": Privs::get_table_privileges() returned an unexpected edit privilege 
for group=" << group_name << ", table_name=" << table_name << std::endl;
           return false;
         }
 
@@ -239,13 +239,13 @@ static bool test(Glom::Document::HostingMode hosting_mode)
         /*
         if(privs.m_create)
         {
-          std::cerr << "Privs::get_table_privileges() returned an unexpected create privilege for group=" << 
group_name << ", table_name=" << table_name << std::endl;
+          std::cerr << G_STRFUNC << ": Privs::get_table_privileges() returned an unexpected create privilege 
for group=" << group_name << ", table_name=" << table_name << std::endl;
           return false;
         }
 
         if(privs.m_delete)
         {
-          std::cerr << "Privs::get_table_privileges() returned an unexpected delete privilege for group=" << 
group_name << ", table_name=" << table_name << std::endl;
+          std::cerr << G_STRFUNC << ": Privs::get_table_privileges() returned an unexpected delete privilege 
for group=" << group_name << ", table_name=" << table_name << std::endl;
           return false;
         }
         */
@@ -256,13 +256,13 @@ static bool test(Glom::Document::HostingMode hosting_mode)
 
       if(!Glom::DbUtils::remove_user_from_group(username, group_name))
       {
-        std::cerr << "DbUtils::remove_user() failed for user=" << username << ", group=" << group_name << 
std::endl;
+        std::cerr << G_STRFUNC << ": DbUtils::remove_user() failed for user=" << username << ", group=" << 
group_name << std::endl;
         return false;
       }
 
       if(!Glom::DbUtils::remove_user(username))
       {
-        std::cerr << "DbUtils::remove_user() failed for user=" << username << std::endl;
+        std::cerr << G_STRFUNC << ": DbUtils::remove_user() failed for user=" << username << std::endl;
         return false;
       }
 
diff --git a/tests/test_selfhosting_new_from_example.cc b/tests/test_selfhosting_new_from_example.cc
index 2a10059..ec43df8 100644
--- a/tests/test_selfhosting_new_from_example.cc
+++ b/tests/test_selfhosting_new_from_example.cc
@@ -33,13 +33,13 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     test_create_and_selfhost_from_example("example_music_collection.glom", document, hosting_mode);
   if(!recreated)
   {
-    std::cerr << "Recreation failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Recreation failed." << std::endl;
     return false;
   }
   
   if(!test_example_musiccollection_data(&document))
   {
-    std::cerr << "test_example_musiccollection_data() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": test_example_musiccollection_data() failed." << std::endl;
     return false;
   }
 
diff --git a/tests/test_selfhosting_new_from_example_float.cc 
b/tests/test_selfhosting_new_from_example_float.cc
index 0a120c4..82325b8 100644
--- a/tests/test_selfhosting_new_from_example_float.cc
+++ b/tests/test_selfhosting_new_from_example_float.cc
@@ -37,7 +37,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     test_create_and_selfhost_from_example("example_smallbusiness.glom", document, hosting_mode);
   if(!recreated)
   {
-    std::cerr << "Recreation failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Recreation failed." << std::endl;
     return false;
   }
   
@@ -45,7 +45,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   Glom::sharedptr<const Glom::Field> primary_key_field = document.get_field_primary_key(table_name);
   if(!primary_key_field)
   {
-    std::cerr << "Failure: primary_key_field is empty." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: primary_key_field is empty." << std::endl;
     return false;
   }
 
@@ -85,16 +85,16 @@ static bool test(Glom::Document::HostingMode hosting_mode)
 
   if(!test_check_numeric_value_type(hosting_mode, value))
   {
-    std::cerr << "Failure: The value has an unexpected type: " << 
+    std::cerr << G_STRFUNC << ": Failure: The value has an unexpected type: " << 
       g_type_name(value.get_value_type()) << std::endl;
     return false;
   }
 
   if(Glom::Conversions::get_double_for_gda_value_numeric(value) != 3.5f)
   {
-    std::cerr << "Failure: The value has an unexpected value: " << value.to_string() << " instead of 3.5" << 
std::endl;
-    std::cerr << "    value as string: " << value.to_string() << std::endl;
-    std::cerr << "    value GType: " << g_type_name(value.get_value_type()) << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The value has an unexpected value: " << value.to_string() << " 
instead of 3.5" << std::endl;
+    std::cerr << G_STRFUNC << ":     value as string: " << value.to_string() << std::endl;
+    std::cerr << G_STRFUNC << ":     value GType: " << g_type_name(value.get_value_type()) << std::endl;
     return false;
   }
 
diff --git a/tests/test_selfhosting_new_from_example_operator.cc 
b/tests/test_selfhosting_new_from_example_operator.cc
index d68114f..71d7310 100644
--- a/tests/test_selfhosting_new_from_example_operator.cc
+++ b/tests/test_selfhosting_new_from_example_operator.cc
@@ -57,14 +57,14 @@ static bool test(Glom::Document::HostingMode hosting_mode)
       test_create_and_selfhost_from_example("example_smallbusiness.glom", document, hosting_mode);
     if(!recreated)
     {
-      std::cerr << "Recreation failed." << std::endl;
+      std::cerr << G_STRFUNC << ": Recreation failed." << std::endl;
       return false;
     }
 
     temp_file_uri = test_get_temp_file_uri();
     if(temp_file_uri.empty())
     {
-      std::cerr << "temp_file_uri is empty." << std::endl;
+      std::cerr << G_STRFUNC << ": temp_file_uri is empty." << std::endl;
       return false;
     }
 
@@ -81,13 +81,13 @@ static bool test(Glom::Document::HostingMode hosting_mode)
       Glom::Privs::get_database_groups();
     if(!contains(group_list, operator_group_name))
     {
-      std::cerr << "The expected group was not found." << std::endl;
+      std::cerr << G_STRFUNC << ": The expected group was not found." << std::endl;
       return false;
     }
 
     if(!Glom::DbUtils::add_user(&document, operator_user, operator_password, operator_group_name))
     {
-      std::cerr << "DbUtils::add_user() failed." << std::endl;
+      std::cerr << G_STRFUNC << ": DbUtils::add_user() failed." << std::endl;
       test_selfhosting_cleanup();
       return false;
     }
@@ -97,7 +97,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
       Glom::DbUtils::get_table_names_from_database(true /* ignore system tables */);
     if(tables.empty())
     {
-      std::cerr << "get_table_names_from_database() failed for developer user." << std::endl;
+      std::cerr << G_STRFUNC << ": get_table_names_from_database() failed for developer user." << std::endl;
       return false;
     }
 
@@ -114,13 +114,13 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     //std::cout << "Document load result=" << test << std::endl;
     if(!test)
     {
-      std::cerr << "Document::load() failed with failure_code=" << failure_code << std::endl;
+      std::cerr << G_STRFUNC << ": Document::load() failed with failure_code=" << failure_code << std::endl;
       return false;
     }
 
     if(!test_selfhost(document, operator_user, operator_password))
     {
-      std::cerr << "test_selfhost() failed." << std::endl;
+      std::cerr << G_STRFUNC << ": test_selfhost() failed." << std::endl;
       return false;
     }
 
@@ -130,13 +130,13 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     const Glom::FieldTypes* field_types = connection_pool->get_field_types();
     if(!field_types)
     {
-      std::cerr << "get_field_types() returned null." << std::endl;
+      std::cerr << G_STRFUNC << ": get_field_types() returned null." << std::endl;
       return false;
     }
 
     if(field_types->get_types_count() == 0)
     {
-      std::cerr << "get_field_types() returned no types." << std::endl;
+      std::cerr << G_STRFUNC << ": get_field_types() returned no types." << std::endl;
       return false;
     }
 
@@ -146,13 +146,13 @@ static bool test(Glom::Document::HostingMode hosting_mode)
       Glom::DbUtils::get_table_names_from_database(true /* ignore system tables */);
     if(tables.empty())
     {
-      std::cerr << "get_table_names_from_database() failed for operator user." << std::endl;
+      std::cerr << G_STRFUNC << ": get_table_names_from_database() failed for operator user." << std::endl;
       return false;
     }
 
     if(Glom::Privs::get_user_is_in_group(connection_pool->get_user(), GLOM_STANDARD_GROUP_NAME_DEVELOPER))
     {
-      std::cerr << "The operator user is in the developer group, but should not be." << std::endl;
+      std::cerr << G_STRFUNC << ": The operator user is in the developer group, but should not be." << 
std::endl;
       return false;
     }
 
diff --git a/tests/test_selfhosting_new_from_example_strangepath.cc 
b/tests/test_selfhosting_new_from_example_strangepath.cc
index d9f12ef..913f749 100644
--- a/tests/test_selfhosting_new_from_example_strangepath.cc
+++ b/tests/test_selfhosting_new_from_example_strangepath.cc
@@ -46,13 +46,13 @@ static bool test(Glom::Document::HostingMode hosting_mode)
       //hosting_mode, "path with space and \" quote and single ' quote and $ dollar sign and / forward slash 
and \\ backwards slash ");
   if(!recreated)
   {
-    std::cerr << "Recreation failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Recreation failed." << std::endl;
     return false;
   }
   
   if(!test_example_musiccollection_data(&document))
   {
-    std::cerr << "test_example_musiccollection_data() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": test_example_musiccollection_data() failed." << std::endl;
     return false;
   }
 
diff --git a/tests/test_selfhosting_new_then_alter_table.cc b/tests/test_selfhosting_new_then_alter_table.cc
index aff7446..d28c420 100644
--- a/tests/test_selfhosting_new_then_alter_table.cc
+++ b/tests/test_selfhosting_new_then_alter_table.cc
@@ -37,25 +37,25 @@ static bool do_test(Glom::Document::HostingMode hosting_mode, const Glib::ustrin
     test_create_and_selfhost_from_example("example_smallbusiness.glom", document, hosting_mode);
   if(!recreated)
   {
-    std::cerr << "Recreation failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Recreation failed." << std::endl;
     return false;
   }
   
   if(!Glom::DbUtils::create_table_with_default_fields(&document, first_table_name))
   {
-    std::cerr << "Failure: create_table_with_default_fields() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: create_table_with_default_fields() failed." << std::endl;
     return false;
   }
 
   if(!Glom::DbUtils::rename_table(first_table_name, renamed_table_name))
   {
-    std::cerr << "Failure: rename_table() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: rename_table() failed." << std::endl;
     return false;
   }
 
   if(!Glom::DbUtils::drop_table(renamed_table_name))
   {
-    std::cerr << "Failure: drop_table() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: drop_table() failed." << std::endl;
     return false;
   }
 
diff --git a/tests/test_selfhosting_new_then_backup_restore.cc 
b/tests/test_selfhosting_new_then_backup_restore.cc
index 6db2179..ccfd897 100644
--- a/tests/test_selfhosting_new_then_backup_restore.cc
+++ b/tests/test_selfhosting_new_then_backup_restore.cc
@@ -43,7 +43,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
       test_create_and_selfhost_from_example("example_music_collection.glom", document, hosting_mode);
     if(!recreated)
     {
-      std::cerr << "Recreation from the example failed." << std::endl;
+      std::cerr << G_STRFUNC << ": Recreation from the example failed." << std::endl;
       return false;
     }
 
@@ -53,7 +53,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
       sigc::ptr_fun(&on_backup_progress));
     if(backup_uri_tarball.empty())
     {
-      std::cerr << "Backup failed." << std::endl;
+      std::cerr << G_STRFUNC << ": Backup failed." << std::endl;
       return false;
     }
 
@@ -68,7 +68,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
         sigc::ptr_fun(&on_backup_progress));
     if(recreated_uri.empty())
     {
-      std::cerr << "Recreation from the example failed." << std::endl;
+      std::cerr << G_STRFUNC << ": Recreation from the example failed." << std::endl;
       return false;
     }
     
@@ -79,7 +79,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
       test_create_and_selfhost_from_uri(recreated_uri, document, hosting_mode);
     if(!recreated)
     {
-      std::cerr << "Recreation from the backup failed." << std::endl;
+      std::cerr << G_STRFUNC << ": Recreation from the backup failed." << std::endl;
       return false;
     }
 
@@ -88,7 +88,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     /* TODO: Find out why this test fails, though it seems to work fine in the UI:
     if(!test_example_musiccollection_data(&document))
     {
-      std::cerr << "test_example_musiccollection_data() failed." << std::endl;
+      std::cerr << G_STRFUNC << ": test_example_musiccollection_data() failed." << std::endl;
       return false;
     }
     */
@@ -105,7 +105,7 @@ int main()
 
   if(!test(Glom::Document::HOSTING_MODE_POSTGRES_SELF))
   {
-    std::cerr << "Failed with PostgreSQL" << std::endl;
+    std::cerr << G_STRFUNC << ": Failed with PostgreSQL" << std::endl;
     test_selfhosting_cleanup();
     return EXIT_FAILURE;
   }
@@ -113,7 +113,7 @@ int main()
   /* TODO: Make this work with sqlite too:
   if(!test(Glom::Document::HOSTING_MODE_SQLITE))
   {
-    std::cerr << "Failed with SQLite" << std::endl;
+    std::cerr << G_STRFUNC << ": Failed with SQLite" << std::endl;
     test_selfhosting_cleanup();
     return EXIT_FAILURE;
   }
diff --git a/tests/test_selfhosting_new_then_change_columns.cc 
b/tests/test_selfhosting_new_then_change_columns.cc
index dab0eaf..bcf6b67 100644
--- a/tests/test_selfhosting_new_then_change_columns.cc
+++ b/tests/test_selfhosting_new_then_change_columns.cc
@@ -39,7 +39,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     test_create_and_selfhost_from_example("example_smallbusiness.glom", document, hosting_mode);
   if(!recreated)
   {
-    std::cerr << "Recreation failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Recreation failed." << std::endl;
     return false;
   }
   
@@ -48,14 +48,14 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   Glom::sharedptr<const Glom::Field> field = document.get_field(table_name, field_name_original);
   if(!field)
   {
-    std::cerr << "Failure: Could not get field." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Could not get field." << std::endl;
     return false;
   }
 
   Glom::sharedptr<Glom::Field> field_new = Glom::glom_sharedptr_clone(field);
   if(!field_new)
   {
-    std::cerr << "Failure: field_new is null." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: field_new is null." << std::endl;
     return false;
   }
   field_new->set_glom_type(Glom::Field::TYPE_TEXT);
@@ -63,7 +63,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   Glom::ConnectionPool* connection_pool = Glom::ConnectionPool::get_instance();
   if(!connection_pool)
   {
-    std::cerr << "Failure: connection_pool is null." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: connection_pool is null." << std::endl;
     return false;
   }
 
@@ -75,13 +75,13 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     const bool test = connection_pool->change_column(table_name, field, field_new);
     if(!test)
     {
-      std::cerr << "Failure: change_column() failed." << std::endl;
+      std::cerr << G_STRFUNC << ": Failure: change_column() failed." << std::endl;
       return false;
     }
   }
   catch(const Glib::Error& ex)
   { 
-    std::cerr << "Failure: change_column() threw an exception: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: change_column() threw an exception: " << ex.what() << std::endl;
     return false;
   }
 
@@ -93,13 +93,13 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     const bool test = connection_pool->change_column(table_name, field, field_new);
     if(!test)
     {
-      std::cerr << "Failure: change_column() failed." << std::endl;
+      std::cerr << G_STRFUNC << ": Failure: change_column() failed." << std::endl;
       return false;
     }
   }
   catch(const Glib::Error& ex)
   { 
-    std::cerr << "Failure: change_column() threw an exception: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: change_column() threw an exception: " << ex.what() << std::endl;
     return false;
   }
 
@@ -111,13 +111,13 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     const bool test = connection_pool->change_column(table_name, field, field_new);
     if(!test)
     {
-      std::cerr << "Failure: change_column() failed." << std::endl;
+      std::cerr << G_STRFUNC << ": Failure: change_column() failed." << std::endl;
       return false;
     }
   }
   catch(const Glib::Error& ex)
   { 
-    std::cerr << "Failure: change_column() threw an exception: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: change_column() threw an exception: " << ex.what() << std::endl;
     return false;
   }
 
@@ -129,13 +129,13 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     const bool test = connection_pool->change_column(table_name, field, field_new);
     if(!test)
     {
-      std::cerr << "Failure: change_column() failed." << std::endl;
+      std::cerr << G_STRFUNC << ": Failure: change_column() failed." << std::endl;
       return false;
     }
   }
   catch(const Glib::Error& ex)
   { 
-    std::cerr << "Failure: change_column() threw an exception: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: change_column() threw an exception: " << ex.what() << std::endl;
     return false;
   }
 
@@ -147,7 +147,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   const double value_next_as_double = Glom::Conversions::get_double_for_gda_value_numeric(value_next);
   if(value_next_as_double != 0)
   {
-    std::cerr << "Failure: The next auto-increment value is not 0 as expected. Instead it is: " << 
value_next_as_double << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The next auto-increment value is not 0 as expected. Instead it is: 
" << value_next_as_double << std::endl;
     return false;
   }
 
@@ -170,13 +170,13 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     const bool test = connection_pool->add_column(table_name, field);
     if(!test)
     {
-      std::cerr << "Failure: add_column() failed." << std::endl;
+      std::cerr << G_STRFUNC << ": Failure: add_column() failed." << std::endl;
       return false;
     }
   }
   catch(const Glib::Error& ex)
   { 
-    std::cerr << "Failure: add_column() threw an exception: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: add_column() threw an exception: " << ex.what() << std::endl;
     return false;
   }
   
diff --git a/tests/test_selfhosting_new_then_choices.cc b/tests/test_selfhosting_new_then_choices.cc
index 6d6c636..3f65f12 100644
--- a/tests/test_selfhosting_new_then_choices.cc
+++ b/tests/test_selfhosting_new_then_choices.cc
@@ -39,7 +39,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     test_create_and_selfhost_from_example("example_smallbusiness.glom", document, hosting_mode);
   if(!recreated)
   {
-    std::cerr << "Recreation failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Recreation failed." << std::endl;
     return false;
   }
   
@@ -49,7 +49,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     get_field_on_layout(document, table_name, table_name, "product_id");
   if(!field_with_choice)
   {
-    std::cerr << "Failure: Could not get the field with choice from the layout." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Could not get the field with choice from the layout." << std::endl;
     return false;
   }
 
@@ -57,7 +57,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     Glom::Utils::get_choice_values_all(&document, field_with_choice);
   if(values_with_second.size() != 3)
   {
-    std::cerr << "Failure: There were an unexpected number of choices." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: There were an unexpected number of choices." << std::endl;
     return false;
   }
   
@@ -65,7 +65,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     = *(values_with_second.begin());
   if(pair_values.second.size() != 1)
   {
-    std::cerr << "Failure: There were an unexpected number of field values in each choice." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: There were an unexpected number of field values in each choice." 
<< std::endl;
     return false;
   }
 
diff --git a/tests/test_selfhosting_new_then_get_privs.cc b/tests/test_selfhosting_new_then_get_privs.cc
index 734ab3c..40a85aa 100644
--- a/tests/test_selfhosting_new_then_get_privs.cc
+++ b/tests/test_selfhosting_new_then_get_privs.cc
@@ -31,14 +31,14 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     test_create_and_selfhost_from_example("example_smallbusiness.glom", document, hosting_mode);
   if(!recreated)
   {
-    std::cerr << "Recreation failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Recreation failed." << std::endl;
     return false;
   }
   
   const Glom::Privs::type_vec_strings groups = Glom::Privs::get_database_groups();
   if(groups.empty())
   {
-    std::cerr << "Failure: groups was empty." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: groups was empty." << std::endl;
     return false;
   }
 
@@ -47,7 +47,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     const Glib::ustring group_name = *iter;
     if(group_name.empty())
     {
-      std::cerr << "Failure: group_name was empty." << std::endl;
+      std::cerr << G_STRFUNC << ": Failure: group_name was empty." << std::endl;
       return false;
     }
 
@@ -57,7 +57,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
       const Glib::ustring user_name = *iter;
       if(user_name.empty())
       {
-        std::cerr << "Failure: user_name was empty." << std::endl;
+        std::cerr << G_STRFUNC << ": Failure: user_name was empty." << std::endl;
         return false;
       }
 
@@ -76,7 +76,7 @@ int main()
   
   if(!test(Glom::Document::HOSTING_MODE_POSTGRES_SELF))
   {
-    std::cerr << "Failed with PostgreSQL" << std::endl;
+    std::cerr << G_STRFUNC << ": Failed with PostgreSQL" << std::endl;
     test_selfhosting_cleanup();
     return EXIT_FAILURE;
   }
@@ -84,7 +84,7 @@ int main()
   /* SQLite does not have this feature:
   if(!test(Glom::Document::HOSTING_MODE_SQLITE))
   {
-    std::cerr << "Failed with SQLite" << std::endl;
+    std::cerr << G_STRFUNC << ": Failed with SQLite" << std::endl;
     test_selfhosting_cleanup();
     return EXIT_FAILURE;
   }
diff --git a/tests/test_selfhosting_new_then_image.cc b/tests/test_selfhosting_new_then_image.cc
index 6d79e7d..86d886b 100644
--- a/tests/test_selfhosting_new_then_image.cc
+++ b/tests/test_selfhosting_new_then_image.cc
@@ -39,7 +39,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     test_create_and_selfhost_from_example("example_smallbusiness.glom", document, hosting_mode);
   if(!recreated)
   {
-    std::cerr << "Recreation failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Recreation failed." << std::endl;
     return false;
   }
   
@@ -53,7 +53,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   const Glom::sharedptr<const Glom::Field> key_field = document.get_field(table_name, "contact_id");
   if(!key_field)
   {
-    std::cerr << "Failure: Could not get key field." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Could not get key field." << std::endl;
     return false;
   }
 
@@ -69,7 +69,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   const int rows_affected = Glom::DbUtils::query_execute(builder_set);
   if(rows_affected == -1)
   {
-    std::cerr << "Failure: UPDATE failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: UPDATE failed." << std::endl;
     return false;
   }
 
@@ -87,14 +87,14 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     Glom::DbUtils::query_execute_select(builder_get);
   if(!test_model_expected_size(data_model, 1, 1))
   {
-    std::cerr << "Failure: Unexpected data model size for main query." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Unexpected data model size for main query." << std::endl;
     return false;
   }
 
   const int count = Glom::DbUtils::count_rows_returned_by(builder_get);
   if(count != 1 )
   {
-    std::cerr << "Failure: The COUNT query returned an unexpected value: " << count << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The COUNT query returned an unexpected value: " << count << 
std::endl;
     return false;
   }
   
@@ -103,7 +103,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   if( (value_read_type != GDA_TYPE_BINARY) &&
     (value_read_type != GDA_TYPE_BLOB))
   {
-    std::cerr << "Failure: The value read was not of the expected type: " << g_type_name( 
value_read.get_value_type() ) << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The value read was not of the expected type: " << g_type_name( 
value_read.get_value_type() ) << std::endl;
     return false;
   }
 
@@ -118,7 +118,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     const bool read_all = gda_blob_op_read_all(const_cast<GdaBlobOp*>(blob->op), const_cast<GdaBlob*>(blob));
     if(!read_all)
     {
-      std::cerr << "Failure: gda_blob_op_read_all() failed." << std::endl;
+      std::cerr << G_STRFUNC << ": Failure: gda_blob_op_read_all() failed." << std::endl;
       return false;
     }
 
@@ -128,19 +128,19 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   const GdaBinary* binary_set = gda_value_get_binary(value_set.gobj());
   if(!binary_set)
   {
-    std::cerr << "Failure: The value read's data was null." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The value read's data was null." << std::endl;
     return false;
   }
 
   if(binary_set->binary_length != binary_read->binary_length)
   {
-    std::cerr << "Failure: The value read's data length was not equal to that of the value set." << 
std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The value read's data length was not equal to that of the value 
set." << std::endl;
     return false;
   }
 
   if(memcmp(binary_set->data, binary_read->data, binary_set->binary_length) != 0)
   {
-    std::cerr << "Failure: The value read was not equal to the value set." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The value read was not equal to the value set." << std::endl;
     return false;
   }
 
diff --git a/tests/test_selfhosting_new_then_lookup.cc b/tests/test_selfhosting_new_then_lookup.cc
index 73e83fa..da0aed4 100644
--- a/tests/test_selfhosting_new_then_lookup.cc
+++ b/tests/test_selfhosting_new_then_lookup.cc
@@ -71,7 +71,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     test_create_and_selfhost_from_example("example_smallbusiness.glom", document, hosting_mode);
   if(!recreated)
   {
-    std::cerr << "Recreation failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Recreation failed." << std::endl;
     return false;
   }
   
@@ -79,7 +79,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   Glom::sharedptr<const Glom::Field> primary_key_field = document.get_field_primary_key(table_name);
   if(!primary_key_field)
   {
-    std::cerr << "Failure: primary_key_field is empty." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: primary_key_field is empty." << std::endl;
     return false;
   }
 
@@ -88,25 +88,25 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   const Glom::Document::type_list_lookups lookups = document.get_lookup_fields(table_name, "product_id");
   if(lookups.size() != 3)
   {
-    std::cerr << "Failure: Unexpected number of lookups: " << lookups.size() << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Unexpected number of lookups: " << lookups.size() << std::endl;
     return false;
   }
 
   if(!contains_field(lookups, table_name, "product_price"))
   {
-    std::cerr << "Failure: Expected lookup field not found." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Expected lookup field not found." << std::endl;
     return false;
   }
 
   if(!contains_field(lookups, table_name, "product_name"))
   {
-    std::cerr << "Failure: Expected lookup field not found." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Expected lookup field not found." << std::endl;
     return false;
   }
 
   if(!contains_field(lookups, table_name, "vat_percentage"))
   {
-    std::cerr << "Failure: Expected lookup field not found." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Expected lookup field not found." << std::endl;
     return false;
   }
 
@@ -116,62 +116,62 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     get_lookup_field(lookups, table_name, field_name, relationship);
   if(!layout_field)
   {
-    std::cerr << "Failure: The lookup field is empty." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The lookup field is empty." << std::endl;
     return false;
   }
  
   if(!relationship)
   {
-    std::cerr << "Failure: The lookup relationship is empty." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The lookup relationship is empty." << std::endl;
     return false;
   }
 
   if(relationship->get_to_table() != "products")
   {
-    std::cerr << "Failure: The relationship's to table is unexpected." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The relationship's to table is unexpected." << std::endl;
     return false;
   }
 
   if(layout_field->get_table_used(table_name) != table_name)
   {
-    std::cerr << "Failure: The lookup field's table is unexpected" << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The lookup field's table is unexpected" << std::endl;
     return false;
   }
 
   if(layout_field->get_name() != field_name)
   {
-    std::cerr << "Failure: The lookup field's name is unexpected." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The lookup field's name is unexpected." << std::endl;
     return false;
   }
 
   const Glom::sharedptr<const Glom::Field> field = layout_field->get_full_field_details();
   if(!field)
   {
-    std::cerr << "Failure: The lookup item's field is empty." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The lookup item's field is empty." << std::endl;
     return false;
   }
 
   if(field->get_name() != field_name)
   {
-    std::cerr << "Failure: The lookup item's field name is unexpected." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The lookup item's field name is unexpected." << std::endl;
     return false;
   }
 
   if(!field->get_is_lookup())
   {
-    std::cerr << "Failure: The lookup item's field is not a lookup." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The lookup item's field is not a lookup." << std::endl;
     return false;
   }
 
   if(field->get_lookup_field() != "price")
   {
-    std::cerr << "Failure: The lookup item's field's name is unexpected." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The lookup item's field's name is unexpected." << std::endl;
     return false;
   }
 
   if(relationship != field->get_lookup_relationship())
   {
-    std::cerr << "Failure: The lookup item's field's relationship is not expected." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The lookup item's field's relationship is not expected." << 
std::endl;
     return false;
   }
 
@@ -183,16 +183,16 @@ static bool test(Glom::Document::HostingMode hosting_mode)
 
   if(!test_check_numeric_value_type(hosting_mode, value))
   {
-    std::cerr << "Failure: The value has an unexpected type: " << 
+    std::cerr << G_STRFUNC << ": Failure: The value has an unexpected type: " << 
       g_type_name(value.get_value_type()) << std::endl;
     return false;
   }
 
   if(Glom::Conversions::get_double_for_gda_value_numeric(value) != 3.5f)
   {
-    std::cerr << "Failure: The value has an unexpected value: " << value.to_string() << " instead of 3.5" << 
std::endl;
-    std::cerr << "    value as string: " << value.to_string() << std::endl;
-    std::cerr << "    value GType: " << g_type_name(value.get_value_type()) << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The value has an unexpected value: " << value.to_string() << " 
instead of 3.5" << std::endl;
+    std::cerr << G_STRFUNC << ":     value as string: " << value.to_string() << std::endl;
+    std::cerr << G_STRFUNC << ":     value GType: " << g_type_name(value.get_value_type()) << std::endl;
     return false;
   }
 
diff --git a/tests/test_selfhosting_new_then_report.cc b/tests/test_selfhosting_new_then_report.cc
index 9b676d4..bcec6fc 100644
--- a/tests/test_selfhosting_new_then_report.cc
+++ b/tests/test_selfhosting_new_then_report.cc
@@ -33,7 +33,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     test_create_and_selfhost_from_example("example_music_collection.glom", document, hosting_mode);
   if(!recreated)
   {
-    std::cerr << "Recreation failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Recreation failed." << std::endl;
     return false;
   }
 
@@ -51,13 +51,13 @@ static bool test(Glom::Document::HostingMode hosting_mode)
 
   if(html.empty())
   {
-    std::cerr << "Failed: html was empty." << std::endl;
+    std::cerr << G_STRFUNC << ": Failed: html was empty." << std::endl;
     return false;
   }
 
   if(html.find("Bruce Springsteen") == std::string::npos)
   {
-    std::cerr << "Failed: html did not contain the expected text." << std::endl;
+    std::cerr << G_STRFUNC << ": Failed: html did not contain the expected text." << std::endl;
     return false;
   }
 
diff --git a/tests/test_selfhosting_new_then_report_summary.cc 
b/tests/test_selfhosting_new_then_report_summary.cc
index 02dfc80..003d3a8 100644
--- a/tests/test_selfhosting_new_then_report_summary.cc
+++ b/tests/test_selfhosting_new_then_report_summary.cc
@@ -33,7 +33,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     test_create_and_selfhost_from_example("example_smallbusiness.glom", document, hosting_mode);
   if(!recreated)
   {
-    std::cerr << "Recreation failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Recreation failed." << std::endl;
     return false;
   }
 
@@ -41,7 +41,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     document.get_report("invoices", "by_customer");
   if(!report)
   {
-    std::cerr << "The report could not be found." << std::endl;
+    std::cerr << G_STRFUNC << ": The report could not be found." << std::endl;
     return false;
   }
 
@@ -56,19 +56,19 @@ static bool test(Glom::Document::HostingMode hosting_mode)
 
   if(html.empty())
   {
-    std::cerr << "Failed: html was empty." << std::endl;
+    std::cerr << G_STRFUNC << ": Failed: html was empty." << std::endl;
     return false;
   }
 
   if(html.find("Yodda Yossarian") == std::string::npos)
   {
-    std::cerr << "Failed: html did not contain the expected text." << std::endl;
+    std::cerr << G_STRFUNC << ": Failed: html did not contain the expected text." << std::endl;
     return false;
   }
 
   if(html.find("90.47") == std::string::npos)
   {
-    std::cerr << "Failed: html did not contain the expected summary number." << std::endl;
+    std::cerr << G_STRFUNC << ": Failed: html did not contain the expected summary number." << std::endl;
     return false;
   }
 
@@ -88,14 +88,14 @@ int main()
 
   if(!test(Glom::Document::HOSTING_MODE_POSTGRES_SELF))
   {
-    std::cerr << "Failed with PostgreSQL" << std::endl;
+    std::cerr << G_STRFUNC << ": Failed with PostgreSQL" << std::endl;
     test_selfhosting_cleanup();
     return EXIT_FAILURE;
   }
   
   if(!test(Glom::Document::HOSTING_MODE_SQLITE))
   {
-    std::cerr << "Failed with SQLite" << std::endl;
+    std::cerr << G_STRFUNC << ": Failed with SQLite" << std::endl;
     test_selfhosting_cleanup();
     return EXIT_FAILURE;
   }
diff --git a/tests/test_selfhosting_non_numeric_primary_keys.cc 
b/tests/test_selfhosting_non_numeric_primary_keys.cc
index c1f2dff..83ab72c 100644
--- a/tests/test_selfhosting_non_numeric_primary_keys.cc
+++ b/tests/test_selfhosting_non_numeric_primary_keys.cc
@@ -33,13 +33,13 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     test_create_and_selfhost_from_test_example("test_example_music_collection_text_pk_fields.glom", 
document, hosting_mode);
   if(!recreated)
   {
-    std::cerr << "Recreation failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Recreation failed." << std::endl;
     return false;
   }
   
   if(!test_example_musiccollection_data(&document))
   {
-    std::cerr << "test_example_musiccollection_data() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": test_example_musiccollection_data() failed." << std::endl;
     return false;
   }
 
diff --git a/tests/test_selfhosting_sqlinjection.cc b/tests/test_selfhosting_sqlinjection.cc
index 32ff5f9..696cd53 100644
--- a/tests/test_selfhosting_sqlinjection.cc
+++ b/tests/test_selfhosting_sqlinjection.cc
@@ -54,7 +54,7 @@ static bool check_get_extra_rows(const Glib::ustring& quote_char)
     Glom::DbUtils::query_execute_select(builder);
   if(!test_model_expected_size(data_model, 2, 0)) //No rows should be returned because the match value was 
stupid, if escaped properly.
   {
-    std::cerr << "Failure: Unexpected data model size for query, with quote_char=" << quote_char << 
std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Unexpected data model size for query, with quote_char=" << 
quote_char << std::endl;
     return false;
   }
 
@@ -87,13 +87,13 @@ static bool check_drop_table(const Glib::ustring& quote_char)
     Glom::DbUtils::query_execute_select(builder);
   if(!test_model_expected_size(data_model, 2, 0)) //No rows should be returned because the match value was 
stupid, if escaped properly.
   {
-    std::cerr << "Failure: Unexpected data model size for query, with quote_char=" << quote_char << 
std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Unexpected data model size for query, with quote_char=" << 
quote_char << std::endl;
     return false;
   }
 
   if(!test_table_exists("songs", document))
   {
-    std::cerr << "Failure: The table may have been dropped." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The table may have been dropped." << std::endl;
     return false;
   }
 
@@ -147,7 +147,7 @@ static bool check_avoid_quotes_and_drop_table_with_false_value_type()
   //We should not get this far, but if we do, tell us more about what happened:
   if(!test_table_exists("songs", document))
   {
-    std::cerr << "Failure: The table may have been dropped." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The table may have been dropped." << std::endl;
     return false;
   }
 
@@ -188,13 +188,13 @@ static bool check_avoid_quotes_and_drop_table_with_false_field_type()
     = Glom::DbUtils::query_execute_select(builder);
   if(!test_model_expected_size(data_model, 2, 0)) //No rows should be returned because the match value was 
stupid, if escaped properly.
   {
-    std::cerr << "Failure: Unexpected data model size for query." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Unexpected data model size for query." << std::endl;
     return false;
   }
 
   if(!test_table_exists("songs", document))
   {
-    std::cerr << "Failure: The table may have been dropped." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The table may have been dropped." << std::endl;
     return false;
   }
 
@@ -207,43 +207,43 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     test_create_and_selfhost_from_example("example_music_collection.glom", document, hosting_mode);
   if(!recreated)
   {
-    std::cerr << "Recreation failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Recreation failed." << std::endl;
     return false;
   }
 
   if(!check_get_extra_rows("\""))
   {
-    std::cerr << "Failure: check_get_extra_rows() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: check_get_extra_rows() failed." << std::endl;
     return false;
   }
   
   if(!check_get_extra_rows("'"))
   {
-    std::cerr << "Failure: check_get_extra_rows() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: check_get_extra_rows() failed." << std::endl;
     return false;
   }
 
   if(!check_drop_table("\""))
   {
-    std::cerr << "Failure: check_drop_table() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: check_drop_table() failed." << std::endl;
     return false;
   }
   
   if(!check_drop_table("'"))
   {
-    std::cerr << "Failure: check_drop_table() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: check_drop_table() failed." << std::endl;
     return false;
   }
 
   if(!check_avoid_quotes_and_drop_table_with_false_value_type())
   {
-    std::cerr << "Failure: check_avoid_quotes_and_drop_table_with_false_value_type() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: check_avoid_quotes_and_drop_table_with_false_value_type() failed." 
<< std::endl;
     return false;
   }
 
   if(!check_avoid_quotes_and_drop_table_with_false_field_type())
   {
-    std::cerr << "Failure: check_avoid_quotes_and_drop_table_with_false_field_type() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: check_avoid_quotes_and_drop_table_with_false_field_type() failed." 
<< std::endl;
     return false;
   }
 
diff --git a/tests/test_selfhosting_utils.cc b/tests/test_selfhosting_utils.cc
index 5b3ca75..9fcdf76 100644
--- a/tests/test_selfhosting_utils.cc
+++ b/tests/test_selfhosting_utils.cc
@@ -162,7 +162,7 @@ bool test_selfhost(Glom::Document& document, const Glib::ustring& user, const Gl
   const Glom::ConnectionPool::StartupErrors started = connection_pool->startup( 
sigc::ptr_fun(&on_startup_progress) );
   if(started != Glom::ConnectionPool::Backend::STARTUPERROR_NONE)
   {
-    std::cerr << "connection_pool->startup(): result=" << started << std::endl;
+    std::cerr << G_STRFUNC << ": connection_pool->startup(): result=" << started << std::endl;
     test_selfhosting_cleanup();
     return false;
   }
@@ -224,7 +224,7 @@ bool test_create_and_selfhost_new_empty(Glom::Document& document, Glom::Document
   
   if(!check_directory_exists())
   {
-    std::cerr << "Failure: The data directory does not exist after calling initialize()." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The data directory does not exist after calling initialize()." << 
std::endl;
     return false;
   }
 
@@ -248,7 +248,7 @@ bool test_create_and_selfhost_new_database(Glom::Document& document, Glom::Docum
   const Glib::ustring db_name = Glom::DbUtils::get_unused_database_name(database_name);
   if(db_name.empty())
   {
-    std::cerr << "DbUtils::get_unused_database_name) failed." << std::endl;
+    std::cerr << G_STRFUNC << ": DbUtils::get_unused_database_name) failed." << std::endl;
     return false;
   }
 
@@ -257,7 +257,7 @@ bool test_create_and_selfhost_new_database(Glom::Document& document, Glom::Docum
     "test title", sigc::ptr_fun(&on_db_creation_progress));
   if(!created)
   {
-    std::cerr << "DbUtils::create_database() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": DbUtils::create_database() failed." << std::endl;
     return false;
   }
   
@@ -368,19 +368,19 @@ bool test_model_expected_size(const Glib::RefPtr<const Gnome::Gda::DataModel>& d
 {
   if(!data_model)
   {
-    std::cerr << "Failure: data_model was null" << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: data_model was null" << std::endl;
     return false;
   }
 
   if(data_model->get_n_columns() != (int)columns_count)
   {
-    std::cerr << "Failure: get_n_columns() returned an unexpected value. Expected: " << columns_count << ", 
Actual: " << data_model->get_n_columns() << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: get_n_columns() returned an unexpected value. Expected: " << 
columns_count << ", Actual: " << data_model->get_n_columns() << std::endl;
     return false;
   }
 
   if(data_model->get_n_rows() != (int)rows_count)
   {
-    std::cerr << "Failure: get_n_rows() returned an unexpected value. Expected: " << rows_count << ", 
Actual: " << data_model->get_n_rows() << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: get_n_rows() returned an unexpected value. Expected: " << 
rows_count << ", Actual: " << data_model->get_n_rows() << std::endl;
     return false;
   }
 
@@ -409,7 +409,7 @@ bool test_table_exists(const Glib::ustring& table_name, const Glom::Document& do
     Glom::DbUtils::query_execute_select(builder);
   if(!data_model || !(data_model->get_n_columns()))
   {
-    std::cerr << "Failure: table does not exist: " << table_name << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: table does not exist: " << table_name << std::endl;
     return false;
   }
 
@@ -445,7 +445,7 @@ static bool test_example_musiccollection_data_related(const Glom::Document* docu
   const Glom::sharedptr<Glom::Relationship> relationship = document->get_relationship("albums", "artist");
   if(!relationship)
   {
-    std::cerr << "Failure: The relationship could not be found." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: The relationship could not be found." << std::endl;
     return false;
   }
   layoutitem = Glom::sharedptr<Glom::LayoutItem_Field>::create();
@@ -465,7 +465,7 @@ static bool test_example_musiccollection_data_related(const Glom::Document* docu
     Glom::DbUtils::query_execute_select(builder);
   if(!test_model_expected_size(data_model, 3, 1))
   {
-    std::cerr << "Failure: Unexpected data model size with query: " << 
+    std::cerr << G_STRFUNC << ": Failure: Unexpected data model size with query: " << 
       Glom::Utils::sqlbuilder_get_full_query(builder) << std::endl;
     return false;
   }
@@ -533,20 +533,20 @@ static bool test_hosting_mode(const SlotTest& slot, Glom::Document::HostingMode
   {
     if(!slot(hosting_mode))
     {
-      std::cerr << "Failed with " << name << std::endl;
+      std::cerr << G_STRFUNC << ": Failed with " << name << std::endl;
       test_selfhosting_cleanup();
       return false;
     }
   }
   catch(const std::exception& ex)
   {
-    std::cerr << "Failed with " << name << " with exception: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Failed with " << name << " with exception: " << ex.what() << std::endl;
     test_selfhosting_cleanup();
     return false;
   }
   catch(...)
   {
-    std::cerr << "Failed with " << name << " with unknown exception: " << std::endl;
+    std::cerr << G_STRFUNC << ": Failed with " << name << " with unknown exception: " << std::endl;
     test_selfhosting_cleanup();
     return false;
   }
diff --git a/tests/test_utils.cc b/tests/test_utils.cc
index 3c12ceb..6995124 100644
--- a/tests/test_utils.cc
+++ b/tests/test_utils.cc
@@ -66,13 +66,13 @@ Gnome::Gda::Value get_value_for_image()
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << "Failed: file_get_contents() failed: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Failed: file_get_contents() failed: " << ex.what() << std::endl;
     return Gnome::Gda::Value(); //Something went wrong. It does not exist.
   }
 
   if(data.empty())
   {
-    std::cerr << "Failed: The data read from the file was empty. filepath=" << filename << std::endl;
+    std::cerr << G_STRFUNC << ": Failed: The data read from the file was empty. filepath=" << filename << 
std::endl;
     return Gnome::Gda::Value();
   }
 
diff --git a/tests/test_utils_images.cc b/tests/test_utils_images.cc
index a77e1e3..4f51032 100644
--- a/tests/test_utils_images.cc
+++ b/tests/test_utils_images.cc
@@ -41,7 +41,7 @@ bool check_value_is_an_image(const Gnome::Gda::Value& value)
   }
   catch(const Gdk::PixbufError& ex)
   {
-    std::cerr << "PixbufLoader::create failed: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": PixbufLoader::create failed: " << ex.what() << std::endl;
     return false;
   }
 
@@ -55,7 +55,7 @@ bool check_value_is_an_image(const Gnome::Gda::Value& value)
   }
   catch(const Glib::Exception& ex)
   {
-    std::cerr << "PixbufLoader::write() failed: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": PixbufLoader::write() failed: " << ex.what() << std::endl;
     return false;
   }
 
diff --git a/tests/translations_po/test_document_export_po.cc 
b/tests/translations_po/test_document_export_po.cc
index 3bac015..19a882e 100644
--- a/tests/translations_po/test_document_export_po.cc
+++ b/tests/translations_po/test_document_export_po.cc
@@ -52,7 +52,7 @@ static bool check_po_file(const std::string& filepath)
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << "Exception caught: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Exception caught: " << ex.what() << std::endl;
   }
 
   if(return_status != EXIT_SUCCESS)
@@ -96,14 +96,14 @@ int main()
 
   if(!test)
   {
-    std::cerr << "Document::load() failed with failure_code=" << failure_code << std::endl;
+    std::cerr << G_STRFUNC << ": Document::load() failed with failure_code=" << failure_code << std::endl;
     return EXIT_FAILURE;
   }
 
   const Glib::ustring po_file_uri = Glom::Utils::get_temp_file_uri("glom_export.po");
   if(po_file_uri.empty())
   {
-    std::cerr << "Could not generate a temporary file URI=" << std::endl;
+    std::cerr << G_STRFUNC << ": Could not generate a temporary file URI=" << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -114,7 +114,7 @@ int main()
     Glom::write_translations_to_po_file(&document, po_file_uri, locale);
   if(!success)
   {
-    std::cerr << "Glom::write_translations_to_po_file() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Glom::write_translations_to_po_file() failed." << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -138,7 +138,7 @@ int main()
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << "Failed: file_get_contents() failed: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": Failed: file_get_contents() failed: " << ex.what() << std::endl;
     return EXIT_FAILURE;
   }
 
diff --git a/tests/translations_po/test_document_import_po.cc 
b/tests/translations_po/test_document_import_po.cc
index 825b910..60f0c09 100644
--- a/tests/translations_po/test_document_import_po.cc
+++ b/tests/translations_po/test_document_import_po.cc
@@ -61,7 +61,7 @@ int main()
 
   if(!test)
   {
-    std::cerr << "Document::load() failed with failure_code=" << failure_code << std::endl;
+    std::cerr << G_STRFUNC << ": Document::load() failed with failure_code=" << failure_code << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -83,7 +83,7 @@ int main()
 
   if(po_file_uri.empty())
   {
-    std::cerr << "po_file_uri was empty." << std::endl;
+    std::cerr << G_STRFUNC << ": po_file_uri was empty." << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -94,7 +94,7 @@ int main()
     Glom::import_translations_from_po_file(&document, po_file_uri, locale);
   if(!success)
   {
-    std::cerr << "Glom::import_translations_from_po_file() failed." << std::endl;
+    std::cerr << G_STRFUNC << ": Glom::import_translations_from_po_file() failed." << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -107,7 +107,7 @@ int main()
   //This should have a new translated title:
   if(table->get_title_translation(locale) != "TestResult1")
   {
-    std::cerr << "Failure: Unexpected translated report title." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Unexpected translated report title." << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -118,7 +118,7 @@ int main()
   //This should have a new translated title:
   if(report->get_title_translation(locale) != "TestResult2")
   {
-    std::cerr << "Failure: Unexpected translated report title." << std::endl;
+    std::cerr << G_STRFUNC << ": Failure: Unexpected translated report title." << std::endl;
     return EXIT_FAILURE;
   }
 


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