[Libreoffice-commits] core.git: 2 commits - ucb/source vcl/unx

Stephan Bergmann sbergman at redhat.com
Thu Sep 26 00:36:26 PDT 2013


 ucb/source/ucp/gio/gio_content.cxx |    5 ++++-
 vcl/unx/gtk/app/gtkinst.cxx        |   34 ++++++++++------------------------
 2 files changed, 14 insertions(+), 25 deletions(-)

New commits:
commit ca4ee400edcb9d077a094f0286861a884c9bc97a
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Sep 26 09:35:34 2013 +0200

    Improve debug output
    
    Change-Id: I10a9c3679ae2d6ca8183b68b60b52e91ecd8f91f

diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx
index ac5ba3a..8621782 100644
--- a/ucb/source/ucp/gio/gio_content.cxx
+++ b/ucb/source/ucp/gio/gio_content.cxx
@@ -363,7 +363,10 @@ GFileInfo* Content::getGFileInfo(const uno::Reference< ucb::XCommandEnvironment
     if (ppError != 0) {
         *ppError = err;
     } else if (err != 0) {
-        SAL_WARN("ucb.ucp.gio", "ignoring GError \"" << err->message << "\"");
+        SAL_WARN(
+            "ucb.ucp.gio",
+            "ignoring GError \"" << err->message << "\" for <"
+                << m_xIdentifier->getContentIdentifier() << ">");
         g_error_free(err);
     }
     return mpInfo;
commit 8802d376686e142f6e07893e3c5a2f5650c31fe5
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Sep 26 09:34:52 2013 +0200

    fprintf -> sal/log.hxx
    
    Change-Id: Ic9962abc8ac8e9992fc26136eb3693e146d38c63

diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index 115550b..dbbcbd1 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -38,10 +38,6 @@
 
 #include <rtl/uri.hxx>
 
-#if OSL_DEBUG_LEVEL > 1
-#include <stdio.h>
-#endif
-
 #include <dlfcn.h>
 #include <fcntl.h>
 #include <unistd.h>
@@ -64,11 +60,10 @@ extern "C"
 
     VCLPLUG_GTK_PUBLIC SalInstance* create_SalInstance( oslModule )
     {
-#if OSL_DEBUG_LEVEL > 1
-        fprintf( stderr, "create vcl plugin instance with gtk version %d %d %d\n",
-                 (int) gtk_major_version, (int) gtk_minor_version,
-                 (int) gtk_micro_version );
-#endif
+        SAL_INFO(
+            "vcl.gtk",
+            "create vcl plugin instance with gtk version " << gtk_major_version
+                << " " << gtk_minor_version << " " << gtk_micro_version);
         if( gtk_major_version < 2 || // very unlikely sanity check
             ( gtk_major_version == 2 && gtk_minor_version < 4 ) )
         {
@@ -93,9 +88,7 @@ extern "C"
 #endif
         if( pVersion )
         {
-#if OSL_DEBUG_LEVEL > 1
-            fprintf( stderr, "gtk version conflict: %s\n", pVersion );
-#endif
+            SAL_WARN("vcl.gtk", "gtk version conflict: " << pVersion);
             return NULL;
         }
 
@@ -109,19 +102,14 @@ extern "C"
 #error "Requires gtk 2.4.0+ for lock hooking"
 #endif
         gdk_threads_set_lock_functions (GdkThreadsEnter, GdkThreadsLeave);
-
-#if OSL_DEBUG_LEVEL > 1
-        fprintf( stderr, "Hooked gdk threads locks\n" );
-#endif
+        SAL_INFO("vcl.gtk", "Hooked gdk threads locks");
 
         pYieldMutex = new GtkYieldMutex();
 
         gdk_threads_init();
 
         GtkInstance* pInstance = new GtkInstance( pYieldMutex );
-#if OSL_DEBUG_LEVEL > 1
-        fprintf( stderr, "creating GtkSalInstance 0x%p\n", pInstance );
-#endif
+        SAL_INFO("vcl.gtk", "creating GtkSalInstance " << pInstance);
 
         //Create SalData, this does not leak
         /*GtkData *pSalData =*/ new GtkData( pInstance );
@@ -342,11 +330,9 @@ void GtkYieldMutex::ThreadsLeave()
 {
     aYieldStack.push_front( mnCount );
 
-#if OSL_DEBUG_LEVEL > 1
-    if( mnThreadId &&
-        mnThreadId != osl::Thread::getCurrentIdentifier())
-        fprintf( stderr, "\n\n--- A different thread owns the mutex ...---\n\n\n");
-#endif
+    SAL_WARN_IF(
+        mnThreadId && mnThreadId != osl::Thread::getCurrentIdentifier(),
+        "vcl.gtk", "other thread " << mnThreadId << " owns the mutex");
 
     while( mnCount > 1 )
         release();


More information about the Libreoffice-commits mailing list