Kaydet (Commit) 221144f9 authored tarafından Rohan Kumar's avatar Rohan Kumar Kaydeden (comit) Björn Michaelsen

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/22315Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarBjörn Michaelsen <bjoern.michaelsen@canonical.com>
üst 1151fec7
...@@ -249,10 +249,7 @@ rtl::Reference< OfficeIPCThread > OfficeIPCThread::pGlobalOfficeIPCThread; ...@@ -249,10 +249,7 @@ rtl::Reference< OfficeIPCThread > OfficeIPCThread::pGlobalOfficeIPCThread;
// Into a hex string of well known length ff132a86... // Into a hex string of well known length ff132a86...
OUString CreateMD5FromString( const OUString& aMsg ) OUString CreateMD5FromString( const OUString& aMsg )
{ {
#if (OSL_DEBUG_LEVEL > 2) SAL_WARN("desktop.app", "create md5 from '" << aMsg << "'");
fprintf( stderr, "create md5 from '%s'\n",
OUStringToOString (aMsg, RTL_TEXTENCODING_UTF8).getStr() );
#endif
rtlDigest handle = rtl_digest_create( rtl_Digest_AlgorithmMD5 ); rtlDigest handle = rtl_digest_create( rtl_Digest_AlgorithmMD5 );
if ( handle ) if ( handle )
...@@ -750,8 +747,8 @@ void OfficeIPCThread::execute() ...@@ -750,8 +747,8 @@ void OfficeIPCThread::execute()
} }
catch ( const CommandLineArgs::Supplier::Exception & ) catch ( const CommandLineArgs::Supplier::Exception & )
{ {
#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL #if (OSL_DEBUG_LEVEL > 0) || defined DBG_UTIL
fprintf( stderr, "Error in received command line arguments\n" ); SAL_WARN("desktop.app", "Error in received command line arguments");
#endif #endif
continue; continue;
} }
...@@ -955,7 +952,7 @@ void OfficeIPCThread::execute() ...@@ -955,7 +952,7 @@ void OfficeIPCThread::execute()
PROCESSING_DONE, SAL_N_ELEMENTS(PROCESSING_DONE)); PROCESSING_DONE, SAL_N_ELEMENTS(PROCESSING_DONE));
// incl. terminating NUL // incl. terminating NUL
if (n != SAL_N_ELEMENTS(PROCESSING_DONE)) { if (n != SAL_N_ELEMENTS(PROCESSING_DONE)) {
SAL_WARN("desktop", "short write: " << n); SAL_WARN("desktop" , "short write: " << n);
continue; continue;
} }
} }
...@@ -969,8 +966,8 @@ void OfficeIPCThread::execute() ...@@ -969,8 +966,8 @@ void OfficeIPCThread::execute()
} }
} }
#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL #if (OSL_DEBUG_LEVEL > 0) || defined DBG_UTIL
fprintf( stderr, "Error on accept: %d\n", (int)nError ); SAL_WARN( "desktop.app", "Error on accept: " << (int)nError);
#endif #endif
TimeValue tval; TimeValue tval;
tval.Seconds = 1; tval.Seconds = 1;
......
...@@ -376,7 +376,7 @@ Reference<deployment::XPackageRegistry> PackageRegistryImpl::create( ...@@ -376,7 +376,7 @@ Reference<deployment::XPackageRegistry> PackageRegistryImpl::create(
create_folder( nullptr, registryCachePath, Reference<XCommandEnvironment>()); create_folder( nullptr, registryCachePath, Reference<XCommandEnvironment>());
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
// dump tables: // dump tables:
{ {
t_registryset allBackends; t_registryset allBackends;
......
...@@ -36,10 +36,7 @@ namespace desktop ...@@ -36,10 +36,7 @@ namespace desktop
UnxSplashScreen::~UnxSplashScreen() UnxSplashScreen::~UnxSplashScreen()
{ {
#if OSL_DEBUG_LEVEL > 1 SAL_WARN("desktop.splash", "UnxSplashScreen::~UnxSplashScreen()");
fprintf( stderr, "UnxSplashScreen::~UnxSplashScreen()\n" );
#endif
if ( m_pOutFd ) if ( m_pOutFd )
{ {
fclose( m_pOutFd ); fclose( m_pOutFd );
...@@ -55,9 +52,7 @@ void SAL_CALL UnxSplashScreen::start( const OUString& /*aText*/, sal_Int32 /*nRa ...@@ -55,9 +52,7 @@ void SAL_CALL UnxSplashScreen::start( const OUString& /*aText*/, sal_Int32 /*nRa
void SAL_CALL UnxSplashScreen::end() void SAL_CALL UnxSplashScreen::end()
throw ( uno::RuntimeException, std::exception ) throw ( uno::RuntimeException, std::exception )
{ {
#if OSL_DEBUG_LEVEL > 1 SAL_WARN("desktop.splash", "UnxSplashScreen::end()");
fprintf( stderr, "UnxSplashScreen::end()\n" );
#endif
if( !m_pOutFd ) if( !m_pOutFd )
return; return;
...@@ -68,9 +63,7 @@ void SAL_CALL UnxSplashScreen::end() ...@@ -68,9 +63,7 @@ void SAL_CALL UnxSplashScreen::end()
void SAL_CALL UnxSplashScreen::reset() void SAL_CALL UnxSplashScreen::reset()
throw ( uno::RuntimeException, std::exception ) throw ( uno::RuntimeException, std::exception )
{ {
#if OSL_DEBUG_LEVEL > 1 SAL_WARN("desktop.splash", "UNXSplashScreen::reset()");
fprintf( stderr, "UnxSplashScreen::reset()\n" );
#endif
if( !m_pOutFd ) if( !m_pOutFd )
return; return;
...@@ -108,11 +101,9 @@ UnxSplashScreen::initialize( const css::uno::Sequence< css::uno::Any>& ) ...@@ -108,11 +101,9 @@ UnxSplashScreen::initialize( const css::uno::Sequence< css::uno::Any>& )
{ {
int fd = aNum.toInt32(); int fd = aNum.toInt32();
m_pOutFd = fdopen( fd, "w" ); m_pOutFd = fdopen( fd, "w" );
#if OSL_DEBUG_LEVEL > 1 SAL_WARN("desktop.splash", "Got argument '--splash-pipe=" << fd << " ('"
fprintf( stderr, "Got argument '--splash-pipe=%d ('%s') (%p)\n", << aNum << "') ("
fd, OUStringToOString( aNum, RTL_TEXTENCODING_UTF8 ).getStr(), << static_cast<void *>(m_pOutFd) << ")");
m_pOutFd );
#endif
} }
} }
} }
......
...@@ -65,9 +65,8 @@ charp_to_ustr( const char *pStr ) ...@@ -65,9 +65,8 @@ charp_to_ustr( const char *pStr )
} }
/* Easier debugging of rtl_uString values. */ /* Easier debugging of rtl_uString values. */
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
static void static void ustr_debug( const char *pMessage, rtl_uString *pStr )
ustr_debug( const char *pMessage, rtl_uString *pStr )
{ {
rtl_String *pOut = ustr_to_str( pStr ); rtl_String *pOut = ustr_to_str( pStr );
...@@ -77,7 +76,7 @@ ustr_debug( const char *pMessage, rtl_uString *pStr ) ...@@ -77,7 +76,7 @@ ustr_debug( const char *pMessage, rtl_uString *pStr )
return; return;
} }
#else #else
#define ustr_debug( a, b ) {} #define ustr_debug(a, b) {}
#endif #endif
typedef struct { typedef struct {
...@@ -237,14 +236,14 @@ get_md5hash( rtl_uString *pText ) ...@@ -237,14 +236,14 @@ get_md5hash( rtl_uString *pText )
sal_uInt32 md5_key_len = 0; sal_uInt32 md5_key_len = 0;
sal_uInt8* md5_buf = NULL; sal_uInt8* md5_buf = NULL;
sal_uInt32 i = 0; sal_uInt32 i = 0;
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
rtl_String *pOut; rtl_String *pOut;
#endif #endif
if ( !pText ) if ( !pText )
return NULL; return NULL;
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
pOut = ustr_to_str( pText ); pOut = ustr_to_str( pText );
fprintf (stderr, "Generate pipe md5 for '%s'\n", pOut->buffer); fprintf (stderr, "Generate pipe md5 for '%s'\n", pOut->buffer);
rtl_string_release( pOut ); rtl_string_release( pOut );
...@@ -575,9 +574,6 @@ read_percent( ChildInfo *info, int *pPercent ) ...@@ -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 ) ) if ( !strncasecmp( pBegin, "end", 3 ) )
return ProgressExit; return ProgressExit;
else if ( !strncasecmp( pBegin, "restart", 7 ) ) else if ( !strncasecmp( pBegin, "restart", 7 ) )
...@@ -730,9 +726,6 @@ exec_javaldx (Args *args) ...@@ -730,9 +726,6 @@ exec_javaldx (Args *args)
*chomp = '\0'; *chomp = '\0';
} }
#if OSL_DEBUG_LEVEL > 1
fprintf (stderr, "Adding javaldx path of '%s'\n", newpath);
#endif
extend_library_path (newpath); extend_library_path (newpath);
if (javaldx) if (javaldx)
...@@ -820,7 +813,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv ) ...@@ -820,7 +813,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv )
close( fd ); close( fd );
} }
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
else else
ustr_debug( "Failed to connect to pipe", pPipePath ); ustr_debug( "Failed to connect to pipe", pPipePath );
#endif #endif
...@@ -877,31 +870,17 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv ) ...@@ -877,31 +870,17 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv )
bShortWait = sal_False; 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); status = child_get_exit_code(info);
g_pProcess = NULL; // reset g_pProcess = NULL; // reset
switch (status) { switch (status) {
case EXITHELPER_CRASH_WITH_RESTART: // re-start with just -env: parameters 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; bRestart = sal_True;
bAllArgs = sal_False; bAllArgs = sal_False;
break; break;
case EXITHELPER_NORMAL_RESTART: // re-start with all arguments 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; bRestart = sal_True;
bAllArgs = sal_True; bAllArgs = sal_True;
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment