desktop/source/app/officeipcthread.cxx             |   15 +++------
 desktop/source/deployment/registry/dp_registry.cxx |    2 -
 desktop/source/splash/unxsplash.cxx                |   21 +++----------
 desktop/unx/source/start.c                         |   33 +++------------------
 4 files changed, 19 insertions(+), 52 deletions(-)

New commits:
commit 221144f9c995fe30adf577c02f756b3123fb2550
Author: Rohan Kumar <rohankanojia...@gmail.com>
Date:   Wed Mar 9 02:16:47 2016 +0530

    tdf#91794 OSL_DEBUG_LEVEL > 1 removed (desktop)
    
    [UPDATED PATCH]: I removed the trailing newline characters in the
    SAL_WARN macro as pointed by Jan Iverson
    
    Change-Id: If90b0d44777ec2ab1bd646f22f4c9cdf798cf8b4
    Reviewed-on: https://gerrit.libreoffice.org/22315
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com>

diff --git a/desktop/source/app/officeipcthread.cxx 
b/desktop/source/app/officeipcthread.cxx
index 6bf4dc5..e9ad39b 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -249,10 +249,7 @@ rtl::Reference< OfficeIPCThread > 
OfficeIPCThread::pGlobalOfficeIPCThread;
 // Into a hex string of well known length ff132a86...
 OUString CreateMD5FromString( const OUString& aMsg )
 {
-#if (OSL_DEBUG_LEVEL > 2)
-    fprintf( stderr, "create md5 from '%s'\n",
-             OUStringToOString (aMsg, RTL_TEXTENCODING_UTF8).getStr() );
-#endif
+    SAL_WARN("desktop.app", "create md5 from '" << aMsg << "'");
 
     rtlDigest handle = rtl_digest_create( rtl_Digest_AlgorithmMD5 );
     if ( handle )
@@ -750,8 +747,8 @@ void OfficeIPCThread::execute()
             }
             catch ( const CommandLineArgs::Supplier::Exception & )
             {
-#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL
-                fprintf( stderr, "Error in received command line arguments\n" 
);
+#if (OSL_DEBUG_LEVEL > 0) || defined DBG_UTIL
+                SAL_WARN("desktop.app", "Error in received command line 
arguments");
 #endif
                 continue;
             }
@@ -955,7 +952,7 @@ void OfficeIPCThread::execute()
                 PROCESSING_DONE, SAL_N_ELEMENTS(PROCESSING_DONE));
                 // incl. terminating NUL
             if (n != SAL_N_ELEMENTS(PROCESSING_DONE)) {
-                SAL_WARN("desktop", "short write: " << n);
+                SAL_WARN("desktop" , "short write: " << n);
                 continue;
             }
         }
@@ -969,8 +966,8 @@ void OfficeIPCThread::execute()
                 }
             }
 
-#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL
-            fprintf( stderr, "Error on accept: %d\n", (int)nError );
+#if (OSL_DEBUG_LEVEL > 0) || defined DBG_UTIL
+            SAL_WARN( "desktop.app", "Error on accept: " << (int)nError);
 #endif
             TimeValue tval;
             tval.Seconds = 1;
diff --git a/desktop/source/deployment/registry/dp_registry.cxx 
b/desktop/source/deployment/registry/dp_registry.cxx
index 4c07228..6faba93 100644
--- a/desktop/source/deployment/registry/dp_registry.cxx
+++ b/desktop/source/deployment/registry/dp_registry.cxx
@@ -376,7 +376,7 @@ Reference<deployment::XPackageRegistry> 
PackageRegistryImpl::create(
     create_folder( nullptr, registryCachePath, 
Reference<XCommandEnvironment>());
 
 
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
     // dump tables:
     {
         t_registryset allBackends;
diff --git a/desktop/source/splash/unxsplash.cxx 
b/desktop/source/splash/unxsplash.cxx
index c396fc5..4018535 100644
--- a/desktop/source/splash/unxsplash.cxx
+++ b/desktop/source/splash/unxsplash.cxx
@@ -36,10 +36,7 @@ namespace desktop
 
 UnxSplashScreen::~UnxSplashScreen()
 {
-#if OSL_DEBUG_LEVEL > 1
-    fprintf( stderr, "UnxSplashScreen::~UnxSplashScreen()\n" );
-#endif
-
+    SAL_WARN("desktop.splash", "UnxSplashScreen::~UnxSplashScreen()");
     if ( m_pOutFd )
     {
         fclose( m_pOutFd );
@@ -55,9 +52,7 @@ void SAL_CALL UnxSplashScreen::start( const OUString& 
/*aText*/, sal_Int32 /*nRa
 void SAL_CALL UnxSplashScreen::end()
     throw ( uno::RuntimeException, std::exception )
 {
-#if OSL_DEBUG_LEVEL > 1
-    fprintf( stderr, "UnxSplashScreen::end()\n" );
-#endif
+    SAL_WARN("desktop.splash", "UnxSplashScreen::end()");
     if( !m_pOutFd )
         return;
 
@@ -68,9 +63,7 @@ void SAL_CALL UnxSplashScreen::end()
 void SAL_CALL UnxSplashScreen::reset()
     throw ( uno::RuntimeException, std::exception )
 {
-#if OSL_DEBUG_LEVEL > 1
-    fprintf( stderr, "UnxSplashScreen::reset()\n" );
-#endif
+    SAL_WARN("desktop.splash", "UNXSplashScreen::reset()");
     if( !m_pOutFd )
         return;
 
@@ -108,11 +101,9 @@ UnxSplashScreen::initialize( const css::uno::Sequence< 
css::uno::Any>& )
         {
             int fd = aNum.toInt32();
             m_pOutFd = fdopen( fd, "w" );
-#if OSL_DEBUG_LEVEL > 1
-            fprintf( stderr, "Got argument '--splash-pipe=%d ('%s') (%p)\n",
-                     fd, OUStringToOString( aNum, RTL_TEXTENCODING_UTF8 
).getStr(),
-                     m_pOutFd );
-#endif
+            SAL_WARN("desktop.splash", "Got argument '--splash-pipe=" << fd << 
" ('"
+                << aNum << "') ("
+                << static_cast<void *>(m_pOutFd) << ")");
         }
     }
 }
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index b072f0f..c867bf3 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -65,9 +65,8 @@ charp_to_ustr( const char *pStr )
 }
 
 /* Easier debugging of rtl_uString values. */
-#if OSL_DEBUG_LEVEL > 1
-static void
-ustr_debug( const char *pMessage, rtl_uString *pStr )
+#if OSL_DEBUG_LEVEL > 0
+static void ustr_debug( const char *pMessage, rtl_uString *pStr )
 {
     rtl_String *pOut = ustr_to_str( pStr );
 
@@ -77,7 +76,7 @@ ustr_debug( const char *pMessage, rtl_uString *pStr )
     return;
 }
 #else
-#define ustr_debug( a, b ) {}
+#define ustr_debug(a, b) {}
 #endif
 
 typedef struct {
@@ -237,14 +236,14 @@ get_md5hash( rtl_uString *pText )
     sal_uInt32 md5_key_len = 0;
     sal_uInt8* md5_buf = NULL;
     sal_uInt32 i = 0;
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
     rtl_String *pOut;
 #endif
 
     if ( !pText )
         return NULL;
 
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
     pOut = ustr_to_str( pText );
     fprintf (stderr, "Generate pipe md5 for '%s'\n", pOut->buffer);
     rtl_string_release( pOut );
@@ -575,9 +574,6 @@ read_percent( ChildInfo *info, int *pPercent )
         }
     }
 
-#if OSL_DEBUG_LEVEL > 1
-    fprintf( stderr, "Got status: %s\n", pBegin );
-#endif
     if ( !strncasecmp( pBegin, "end", 3 ) )
         return ProgressExit;
     else if ( !strncasecmp( pBegin, "restart", 7 ) )
@@ -730,9 +726,6 @@ exec_javaldx (Args *args)
             *chomp = '\0';
     }
 
-#if OSL_DEBUG_LEVEL > 1
-    fprintf (stderr, "Adding javaldx path of '%s'\n", newpath);
-#endif
     extend_library_path (newpath);
 
     if (javaldx)
@@ -820,7 +813,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv )
 
             close( fd );
         }
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
         else
             ustr_debug( "Failed to connect to pipe", pPipePath );
 #endif
@@ -877,31 +870,17 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv )
                     bShortWait = sal_False;
                 }
 
-#if OSL_DEBUG_LEVEL > 1
-                fprintf( stderr, "Polling, result is %s\n",
-                         ( eResult == ProgressContinue )? "continue" :
-                         ( ( eResult == ProgressRestart )? "restart" : "exit" 
) );
-#endif
             }
 
-#if OSL_DEBUG_LEVEL > 1
-            fprintf (stderr, "Exited with code '%d'\n", child_get_exit_code 
(info));
-#endif
 
             status = child_get_exit_code(info);
             g_pProcess = NULL; // reset
             switch (status) {
             case EXITHELPER_CRASH_WITH_RESTART: // re-start with just -env: 
parameters
-#if OSL_DEBUG_LEVEL > 1
-                fprintf (stderr, "oosplash: re-start with just -env: params 
!\n");
-#endif
                 bRestart = sal_True;
                 bAllArgs = sal_False;
                 break;
             case EXITHELPER_NORMAL_RESTART: // re-start with all arguments
-#if OSL_DEBUG_LEVEL > 1
-                fprintf (stderr, "oosplash: re-start with all params !\n");
-#endif
                 bRestart = sal_True;
                 bAllArgs = sal_True;
                 break;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to