summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorRadu Ioan <ioan.radu.g@gmail.com>2013-05-27 00:22:20 +0300
committerLuboš Luňák <l.lunak@suse.cz>2013-05-31 18:08:02 +0000
commit660b67a413fed152bc273bdc534e53b01b1e9d77 (patch)
tree1bdaad775c26d63325d32c8529d303cf0261b587 /desktop
parent2c7b6aa7a3127370afa41c1e83b2c198da504055 (diff)
fdo#63690 - replace RTL_CONTEXT_ macros with SAL_INFO
- replaced RTL_CONTEXT_ with SAL_INFO - replace OSL_* with SAL_* Change-Id: Id4e90b83a7275bfd30914f7514a609cebbfbf4ac Reviewed-on: https://gerrit.libreoffice.org/4044 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx148
-rw-r--r--desktop/source/app/appinit.cxx21
-rw-r--r--desktop/source/app/check_ext_deps.cxx7
-rw-r--r--desktop/source/offacc/acceptor.cxx16
-rw-r--r--desktop/source/splash/splash.cxx5
5 files changed, 86 insertions, 111 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index de16f0a1c5bf..6b337ae4d282 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -86,7 +86,6 @@
#include <unotools/pathoptions.hxx>
#include <svtools/miscopt.hxx>
#include <svtools/menuoptions.hxx>
-#include <rtl/logfile.hxx>
#include <rtl/bootstrap.hxx>
#include <vcl/help.hxx>
#include <vcl/msgbox.hxx>
@@ -166,8 +165,7 @@ void removeTree(OUString const & url) {
case osl::FileBase::E_NOENT:
return; //TODO: SAL_WARN if recursive
default:
- SAL_WARN(
- "desktop", "cannot open directory " << dir.getURL() << ": " << +rc);
+ SAL_WARN("desktop.app", "cannot open directory " << dir.getURL() << ": " << +rc);
return;
}
for (;;) {
@@ -177,9 +175,7 @@ void removeTree(OUString const & url) {
break;
}
if (rc != osl::FileBase::E_None) {
- SAL_WARN(
- "desktop",
- "cannot iterate directory " << dir.getURL() << ": " << +rc);
+ SAL_WARN( "desktop.app", "cannot iterate directory " << dir.getURL() << ": " << +rc);
break;
}
osl::FileStatus stat(
@@ -187,9 +183,7 @@ void removeTree(OUString const & url) {
osl_FileStatus_Mask_FileURL);
rc = i.getFileStatus(stat);
if (rc != osl::FileBase::E_None) {
- SAL_WARN(
- "desktop",
- "cannot stat in directory " << dir.getURL() << ": " << +rc);
+ SAL_WARN( "desktop.app", "cannot stat in directory " << dir.getURL() << ": " << +rc);
continue;
}
if (stat.getFileType() == osl::FileStatus::Directory) { //TODO: symlinks
@@ -197,19 +191,19 @@ void removeTree(OUString const & url) {
} else {
rc = osl::File::remove(stat.getFileURL());
SAL_WARN_IF(
- rc != osl::FileBase::E_None, "desktop",
+ rc != osl::FileBase::E_None, "desktop.app",
"cannot remove file " << stat.getFileURL() << ": " << +rc);
}
}
if (dir.isOpen()) {
rc = dir.close();
SAL_WARN_IF(
- rc != osl::FileBase::E_None, "desktop",
+ rc != osl::FileBase::E_None, "desktop.app",
"cannot close directory " << dir.getURL() << ": " << +rc);
}
rc = osl::Directory::remove(url);
SAL_WARN_IF(
- rc != osl::FileBase::E_None, "desktop",
+ rc != osl::FileBase::E_None, "desktop.app",
"cannot remove directory " << url << ": " << +rc);
}
@@ -261,12 +255,10 @@ bool cleanExtensionCache() {
rc = fr.readLine(s1);
osl::FileBase::RC rc2 = fr.close();
SAL_WARN_IF(
- rc2 != osl::FileBase::E_None, "desktop",
+ rc2 != osl::FileBase::E_None, "desktop.app",
"cannot close " << fr.getURL() << " after reading: " << +rc2);
if (rc != osl::FileBase::E_None) {
- SAL_WARN(
- "desktop",
- "cannot read from " << fr.getURL() << ": " << +rc);
+ SAL_WARN( "desktop.app", "cannot read from " << fr.getURL() << ": " << +rc);
break;
}
OUString s2(
@@ -282,9 +274,7 @@ bool cleanExtensionCache() {
case osl::FileBase::E_NOENT:
break;
default:
- SAL_WARN(
- "desktop",
- "cannot open " << fr.getURL() << " for reading: " << +rc);
+ SAL_WARN( "desktop.app", "cannot open " << fr.getURL() << " for reading: " << +rc);
break;
}
removeTree(extDir);
@@ -294,18 +284,16 @@ bool cleanExtensionCache() {
rtl::Bootstrap::expandMacros(userRcFile); //TODO: detect failure
rc = osl::File::remove(userRcFile);
SAL_WARN_IF(
- rc != osl::FileBase::E_None && rc != osl::FileBase::E_NOENT, "desktop",
+ rc != osl::FileBase::E_None && rc != osl::FileBase::E_NOENT, "desktop.app",
"cannot remove file " << userRcFile << ": " << +rc);
rc = osl::Directory::createPath(extDir);
SAL_WARN_IF(
- rc != osl::FileBase::E_None && rc != osl::FileBase::E_EXIST, "desktop",
+ rc != osl::FileBase::E_None && rc != osl::FileBase::E_EXIST, "desktop.app",
"cannot create path " << extDir << ": " << +rc);
osl::File fw(buildIdFile);
rc = fw.open(osl_File_OpenFlag_Write | osl_File_OpenFlag_Create);
if (rc != osl::FileBase::E_None) {
- SAL_WARN(
- "desktop",
- "cannot open " << fw.getURL() << " for writing: " << +rc);
+ SAL_WARN( "desktop.app", "cannot open " << fw.getURL() << " for writing: " << +rc);
return true;
}
OString buf(OUStringToOString(buildId, RTL_TEXTENCODING_UTF8));
@@ -317,11 +305,11 @@ bool cleanExtensionCache() {
SAL_WARN_IF(
(rc != osl::FileBase::E_None
|| n != static_cast< sal_uInt32 >(buf.getLength())),
- "desktop",
+ "desktop.app",
"cannot write to " << fw.getURL() << ": " << +rc << ", " << n);
rc = fw.close();
SAL_WARN_IF(
- rc != osl::FileBase::E_None, "desktop",
+ rc != osl::FileBase::E_None, "desktop.app",
"cannot close " << fw.getURL() << " after writing: " << +rc);
return true;
}
@@ -557,7 +545,7 @@ Desktop::Desktop()
, m_bServicesRegistered( false )
, m_aBootstrapError( BE_OK )
{
- RTL_LOGFILE_TRACE( "desktop (cd100003) ::Desktop::Desktop" );
+ SAL_INFO( "desktop.app", "desktop (cd100003) ::Desktop::Desktop" );
}
Desktop::~Desktop()
@@ -569,7 +557,7 @@ Desktop::~Desktop()
void Desktop::Init()
{
- RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::Desktop::Init" );
+ SAL_INFO( "desktop.app", "desktop (cd100003) ::Desktop::Init" );
SetBootstrapStatus(BS_OK);
m_bCleanedExtensionCache = cleanExtensionCache();
@@ -605,7 +593,7 @@ void Desktop::Init()
const CommandLineArgs& rCmdLineArgs = GetCommandLineArgs();
// start ipc thread only for non-remote offices
- RTL_LOGFILE_CONTEXT( aLog2, "desktop (cd100003) ::OfficeIPCThread::EnableOfficeIPCThread" );
+ SAL_INFO( "desktop.app", "desktop (cd100003) ::OfficeIPCThread::EnableOfficeIPCThread" );
OfficeIPCThread::Status aStatus = OfficeIPCThread::EnableOfficeIPCThread();
if ( aStatus == OfficeIPCThread::IPC_STATUS_PIPE_ERROR )
{
@@ -650,21 +638,21 @@ void Desktop::Init()
void Desktop::InitFinished()
{
- RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::Desktop::InitFinished" );
+ SAL_INFO( "desktop.app", "desktop (cd100003) ::Desktop::InitFinished" );
CloseSplashScreen();
}
void Desktop::DeInit()
{
- RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::Desktop::DeInit" );
+ SAL_INFO( "desktop.app", "desktop (cd100003) ::Desktop::DeInit" );
try {
// instead of removing of the configManager just let it commit all the changes
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- store config items" );
+ SAL_INFO( "desktop.app", "<- store config items" );
utl::ConfigManager::storeConfigItems();
FlushConfiguration();
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- store config items" );
+ SAL_INFO( "desktop.app", "<- store config items" );
// close splashscreen if it's still open
CloseSplashScreen();
@@ -685,16 +673,16 @@ void Desktop::DeInit()
// this will leave some garbage behind..
}
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "FINISHED WITH Destop::DeInit" );
+ SAL_INFO( "desktop.app", "FINISHED WITH Destop::DeInit" );
}
sal_Bool Desktop::QueryExit()
{
try
{
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- store config items" );
+ SAL_INFO( "desktop.app", "<- store config items" );
utl::ConfigManager::storeConfigItems();
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- store config items" );
+ SAL_INFO( "desktop.app", "<- store config items" );
}
catch ( const RuntimeException& )
{
@@ -881,8 +869,8 @@ void Desktop::HandleBootstrapErrors(
/// the bootstrap INI file could not be found or read
/// the bootstrap INI is missing a required entry
/// the bootstrap INI contains invalid data
- case ::utl::Bootstrap::MISSING_BOOTSTRAP_FILE_ENTRY:
- case ::utl::Bootstrap::INVALID_BOOTSTRAP_FILE_ENTRY:
+ case ::utl::Bootstrap::MISSING_BOOTSTRAP_FILE_ENTRY:
+ case ::utl::Bootstrap::INVALID_BOOTSTRAP_FILE_ENTRY:
case ::utl::Bootstrap::MISSING_BOOTSTRAP_FILE:
{
OUString aBootstrapFileURL;
@@ -895,7 +883,7 @@ void Desktop::HandleBootstrapErrors(
/// the version locator INI file could not be found or read
/// the version locator INI has no entry for this version
/// the version locator INI entry is not a valid directory URL
- case ::utl::Bootstrap::INVALID_VERSION_FILE_ENTRY:
+ case ::utl::Bootstrap::INVALID_VERSION_FILE_ENTRY:
case ::utl::Bootstrap::MISSING_VERSION_FILE_ENTRY:
case ::utl::Bootstrap::MISSING_VERSION_FILE:
{
@@ -907,7 +895,7 @@ void Desktop::HandleBootstrapErrors(
break;
/// the user installation directory does not exist
- case ::utl::Bootstrap::MISSING_USER_DIRECTORY:
+ case ::utl::Bootstrap::MISSING_USER_DIRECTORY:
{
OUString aUserInstallationURL;
@@ -1336,7 +1324,7 @@ namespace {
// frame/window is created. Since we do not use the TaskCreator here, we need to mimic its behavior,
// otherwise documents loaded into this frame will later on miss functionality depending on the style.
Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow );
- OSL_ENSURE( pContainerWindow, "Desktop::Main: no implementation access to the frame's container window!" );
+ SAL_WARN_IF( !pContainerWindow, "desktop.app", "Desktop::Main: no implementation access to the frame's container window!" );
if (!pContainerWindow) {
fprintf (stderr, "Error: It very much looks as if you have used 'linkoo' (or bin/ooinstall -l)\n"
"but have then forgotten to source 'ooenv' into your shell before running !\n"
@@ -1367,7 +1355,7 @@ int Desktop::Main()
{
pExecGlobals = new ExecuteGlobals();
- RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::Desktop::Main" );
+ SAL_INFO( "desktop.app", "desktop (cd100003) ::Desktop::Main" );
// Remember current context object
com::sun::star::uno::ContextLayer layer(
@@ -1416,16 +1404,16 @@ int Desktop::Main()
ResMgr::SetReadStringHook( ReplaceStringHookProc );
// Startup screen
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main { OpenSplashScreen" );
+ SAL_INFO( "desktop.app", "desktop (lo119109) Desktop::Main { OpenSplashScreen" );
OpenSplashScreen();
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main } OpenSplashScreen" );
+ SAL_INFO( "desktop.app", "desktop (lo119109) Desktop::Main } OpenSplashScreen" );
SetSplashScreenProgress(10);
UserInstall::UserInstallStatus inst_fin = UserInstall::finalize();
if (inst_fin != UserInstall::Ok && inst_fin != UserInstall::Created)
{
- OSL_FAIL("userinstall failed");
+ SAL_WARN( "desktop.app", "userinstall failed");
if ( inst_fin == UserInstall::E_NoDiskSpace )
HandleBootstrapErrors(
BE_USERINSTALL_NOTENOUGHDISKSPACE, OUString() );
@@ -1452,7 +1440,7 @@ int Desktop::Main()
// check user installation directory for lockfile so we can be sure
// there is no other instance using our data files from a remote host
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main -> Lockfile" );
+ SAL_INFO( "desktop.app", "desktop (lo119109) Desktop::Main -> Lockfile" );
m_xLockfile.reset(new Lockfile);
#if HAVE_FEATURE_DESKTOP
@@ -1462,10 +1450,10 @@ int Desktop::Main()
// Lockfile exists, and user clicked 'no'
return EXIT_FAILURE;
}
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main <- Lockfile" );
+ SAL_INFO( "desktop.app", "desktop (lo119109) Desktop::Main <- Lockfile" );
// check if accessibility is enabled but not working and allow to quit
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ GetEnableATToolSupport" );
+ SAL_INFO( "desktop.app", "{ GetEnableATToolSupport" );
if( Application::GetSettings().GetMiscSettings().GetEnableATToolSupport() )
{
bool bQuitApp;
@@ -1474,7 +1462,7 @@ int Desktop::Main()
if( bQuitApp )
return EXIT_FAILURE;
}
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "} GetEnableATToolSupport" );
+ SAL_INFO( "desktop.app", "} GetEnableATToolSupport" );
#endif
// terminate if requested...
@@ -1512,10 +1500,10 @@ int Desktop::Main()
SetDisplayName( aTitle );
SetSplashScreenProgress(35);
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ create SvtPathOptions and SvtLanguageOptions" );
+ SAL_INFO( "desktop.app", "{ create SvtPathOptions and SvtLanguageOptions" );
pExecGlobals->pPathOptions.reset( new SvtPathOptions);
SetSplashScreenProgress(40);
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "} create SvtPathOptions and SvtLanguageOptions" );
+ SAL_INFO( "desktop.app", "} create SvtPathOptions and SvtLanguageOptions" );
xDesktop = css::frame::Desktop::create( xContext );
@@ -1559,9 +1547,9 @@ int Desktop::Main()
sal_Bool bExistsRecoveryData = sal_False;
sal_Bool bExistsSessionData = sal_False;
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ impl_checkRecoveryState" );
+ SAL_INFO( "desktop.app", "{ impl_checkRecoveryState" );
impl_checkRecoveryState(bCrashed, bExistsRecoveryData, bExistsSessionData);
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "} impl_checkRecoveryState" );
+ SAL_INFO( "desktop.app", "} impl_checkRecoveryState" );
OUString pidfileName = rCmdLineArgs.GetPidfileName();
if ( !pidfileName.isEmpty() )
@@ -1580,18 +1568,18 @@ int Desktop::Main()
sal_uInt64 written = 0;
if ( pidfile.write(pid.getStr(), pid.getLength(), written) != osl::File::E_None )
{
- SAL_WARN("desktop", "cannot write pidfile " << pidfile.getURL());
+ SAL_WARN("desktop.app", "cannot write pidfile " << pidfile.getURL());
}
pidfile.close();
}
else
{
- SAL_WARN("desktop", "cannot open pidfile " << pidfile.getURL() << osl::FileBase::RC(rc));
+ SAL_WARN("desktop.app", "cannot open pidfile " << pidfile.getURL() << osl::FileBase::RC(rc));
}
}
else
{
- SAL_WARN("desktop", "cannot get pidfile URL from path" << pidfileName);
+ SAL_WARN("desktop.app", "cannot get pidfile URL from path" << pidfileName);
}
}
@@ -1615,9 +1603,9 @@ int Desktop::Main()
(!bExistsSessionData ) &&
(!Application::AnyInput( VCL_INPUT_APPEVENT ) ))
{
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ create BackingComponent" );
+ SAL_INFO( "desktop.app", "{ create BackingComponent" );
ShowBackingComponent(this);
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "} create BackingComponent" );
+ SAL_INFO( "desktop.app", "} create BackingComponent" );
}
}
}
@@ -1666,7 +1654,7 @@ int Desktop::Main()
!rCmdLineArgs.IsNoQuickstart() )
InitializeQuickstartMode( xContext );
- RTL_LOGFILE_CONTEXT( aLog2, "desktop (cd100003) createInstance com.sun.star.frame.Desktop" );
+ SAL_INFO( "desktop.app", "desktop (cd100003) createInstance com.sun.star.frame.Desktop" );
try
{
if ( xDesktop.is() )
@@ -1698,7 +1686,7 @@ int Desktop::Main()
Application::AcquireSolarMutex( nAcquireCount );
// call Application::Execute to process messages in vcl message loop
- RTL_LOGFILE_PRODUCT_TRACE( "PERFORMANCE - enter Application::Execute()" );
+ SAL_INFO( "desktop.app", "PERFORMANCE - enter Application::Execute()" );
try
{
@@ -1774,12 +1762,12 @@ int Desktop::doShutdown()
{
if ( osl::File::remove( pidfileURL ) != osl::FileBase::E_None )
{
- SAL_WARN("desktop", "shutdown: cannot remove pidfile " << pidfileURL);
+ SAL_WARN("desktop.app", "shutdown: cannot remove pidfile " << pidfileURL);
}
}
else
{
- SAL_WARN("desktop", "shutdown: cannot get pidfile URL from path" << pidfileName);
+ SAL_WARN("desktop.app", "shutdown: cannot get pidfile URL from path" << pidfileName);
}
}
@@ -1793,15 +1781,15 @@ int Desktop::doShutdown()
Application::AcquireSolarMutex(nAcquireCount);
// be sure that path/language options gets destroyed before
// UCB is deinitialized
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "-> dispose path/language options" );
+ SAL_INFO( "desktop.app", "-> dispose path/language options" );
pExecGlobals->pLanguageOptions.reset( 0 );
pExecGlobals->pPathOptions.reset( 0 );
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- dispose path/language options" );
+ SAL_INFO( "desktop.app", "<- dispose path/language options" );
sal_Bool bRR = pExecGlobals->bRestartRequested;
delete pExecGlobals, pExecGlobals = NULL;
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "FINISHED WITH Destop::Main" );
+ SAL_INFO( "desktop.app", "FINISHED WITH Destop::Main" );
if ( bRR )
{
restartOnMac(true);
@@ -1820,7 +1808,7 @@ IMPL_LINK( Desktop, ImplInitFilterHdl, ConvertData*, pData )
bool Desktop::InitializeConfiguration()
{
- RTL_LOGFILE_CONTEXT( aLog, "desktop (jb99855) ::InitConfiguration" );
+ SAL_INFO( "desktop.app", "desktop (jb99855) ::InitConfiguration" );
try
{
css::configuration::theDefaultProvider::get(
@@ -1916,7 +1904,7 @@ sal_Bool Desktop::InitializeQuickstartMode( const Reference< XComponentContext >
// the shutdown icon sits in the systray and allows the user to keep
// the office instance running for quicker restart
// this will only be activated if --quickstart was specified on cmdline
- RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) createInstance com.sun.star.office.Quickstart" );
+ SAL_INFO( "desktop.app", "desktop (cd100003) createInstance com.sun.star.office.Quickstart" );
sal_Bool bQuickstart = shouldLaunchQuickstart();
@@ -2012,7 +2000,7 @@ class ExitTimer : public Timer
IMPL_LINK_NOARG(Desktop, OpenClients_Impl)
{
- RTL_LOGFILE_PRODUCT_CONTEXT( aLog, "PERFORMANCE - DesktopOpenClients_Impl()" );
+ SAL_INFO( "desktop.app", "PERFORMANCE - DesktopOpenClients_Impl()" );
try {
OpenClients();
@@ -2043,7 +2031,7 @@ IMPL_LINK_NOARG(Desktop, EnableAcceptors_Impl)
// Registers a COM class factory of the service manager with the windows operating system.
void Desktop::EnableOleAutomation()
{
- RTL_LOGFILE_CONTEXT( aLog, "desktop (jl97489) ::Desktop::EnableOleAutomation" );
+ SAL_INFO( "desktop.app", "desktop (jl97489) ::Desktop::EnableOleAutomation" );
#ifdef WNT
Reference< XMultiServiceFactory > xSMgr= comphelper::getProcessServiceFactory();
xSMgr->createInstance(OUString("com.sun.star.bridge.OleApplicationRegistration"));
@@ -2376,9 +2364,7 @@ void Desktop::OpenClients()
}
catch(const css::uno::Exception& e)
{
- OUString aMessage = OUString("Could not disable AutoRecovery.\n")
- + e.Message;
- OSL_FAIL(OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
+ SAL_WARN( "desktop.app", "Could not disable AutoRecovery." << e.Message);
}
}
else
@@ -2405,9 +2391,7 @@ void Desktop::OpenClients()
}
catch(const css::uno::Exception& e)
{
- OUString aMessage = OUString("Error during recovery\n")
- + e.Message;
- OSL_FAIL(OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
+ SAL_WARN( "desktop.app", "Error during recovery" << e.Message);
}
}
@@ -2428,9 +2412,7 @@ void Desktop::OpenClients()
}
catch(const com::sun::star::uno::Exception& e)
{
- OUString aMessage = OUString("Registration of session listener failed\n")
- + e.Message;
- OSL_FAIL(OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
+ SAL_WARN( "desktop.app", "Registration of session listener failed" << e.Message);
}
if ( !bExistsRecoveryData )
@@ -2442,9 +2424,7 @@ void Desktop::OpenClients()
}
catch(const com::sun::star::uno::Exception& e)
{
- OUString aMessage = OUString("Error in session management\n")
- + e.Message;
- OSL_FAIL(OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
+ SAL_WARN( "desktop.app", "Error in session management" << e.Message);
}
}
}
@@ -2536,7 +2516,7 @@ void Desktop::OpenClients()
void Desktop::OpenDefault()
{
- RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::Desktop::OpenDefault" );
+ SAL_INFO( "desktop.app", "desktop (cd100003) ::Desktop::OpenDefault" );
OUString aName;
SvtModuleOptions aOpt;
@@ -2791,7 +2771,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
destroyAcceptor(rAppEvent.GetData());
break;
default:
- OSL_FAIL("this cannot happen");
+ SAL_WARN( "desktop.app", "this cannot happen");
break;
}
}
@@ -2885,7 +2865,7 @@ void Desktop::DoFirstRunInitializations()
}
catch(const ::com::sun::star::uno::Exception&)
{
- OSL_FAIL( "Desktop::DoFirstRunInitializations: caught an exception while trigger job executor ..." );
+ SAL_WARN( "desktop.app", "Desktop::DoFirstRunInitializations: caught an exception while trigger job executor ..." );
}
}
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index d555c03ebbd1..9c818d8e3093 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -46,7 +46,6 @@
#include <tools/rcid.h>
-#include <rtl/logfile.hxx>
#include <rtl/instance.hxx>
#include <comphelper/processfactory.hxx>
#include <unotools/localfilehelper.hxx>
@@ -69,7 +68,7 @@ namespace desktop
static void configureUcb()
{
- RTL_LOGFILE_CONTEXT( aLog, "desktop (sb93797) ::configureUcb" );
+ SAL_INFO( "desktop.app", "desktop (sb93797) ::configureUcb" );
// For backwards compatibility, in case some code still uses plain
// createInstance w/o args directly to obtain an instance:
@@ -98,14 +97,14 @@ static void configureUcb()
}
catch ( const Exception & )
{
- SAL_WARN( "desktop", "missing gnome-vfs component to initialize thread workaround" );
+ SAL_WARN( "desktop.app", "missing gnome-vfs component to initialize thread workaround" );
}
#endif // ENABLE_GNOME_VFS
}
void Desktop::InitApplicationServiceManager()
{
- RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::createApplicationServiceManager" );
+ SAL_INFO( "desktop.app", "desktop (cd100003) ::createApplicationServiceManager" );
Reference<XMultiServiceFactory> sm;
#ifdef ANDROID
OUString aUnoRc( OUString( "file:///assets/program/unorc" ) );
@@ -124,7 +123,7 @@ void Desktop::RegisterServices(Reference< XComponentContext > const & context)
{
if( !m_bServicesRegistered )
{
- RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::registerServices" );
+ SAL_INFO( "desktop.app", "desktop (cd100003) ::registerServices" );
// interpret command line arguments
CommandLineArgs& rCmdLine = GetCommandLineArgs();
@@ -188,13 +187,13 @@ void Desktop::createAcceptor(const OUString& aAcceptString)
{
// no error handling needed...
// acceptor just won't come up
- OSL_FAIL("Acceptor could not be created.");
+ SAL_WARN( "desktop.app", "Acceptor could not be created.");
}
}
else
{
// there is already an acceptor with this description
- OSL_FAIL("Acceptor already exists.");
+ SAL_WARN( "desktop.app", "Acceptor already exists.");
}
}
}
@@ -216,7 +215,7 @@ class enable
void Desktop::enableAcceptors()
{
- RTL_LOGFILE_CONTEXT(aLog, "desktop (lo119109) Desktop::enableAcceptors");
+ SAL_INFO( "desktop.app", "desktop (lo119109) Desktop::enableAcceptors");
if (!bAccept)
{
// from now on, all new acceptors are enabled
@@ -243,7 +242,7 @@ void Desktop::destroyAcceptor(const OUString& aAcceptString)
// this is the last reference and the acceptor will be destructed
rMap.erase(aAcceptString);
} else {
- OSL_FAIL("Found no acceptor to remove");
+ SAL_WARN( "desktop.app", "Found no acceptor to remove");
}
}
}
@@ -257,7 +256,7 @@ void Desktop::DeregisterServices()
void Desktop::CreateTemporaryDirectory()
{
- RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::createTemporaryDirectory" );
+ SAL_INFO( "desktop.app", "desktop (cd100003) ::createTemporaryDirectory" );
OUString aTempBaseURL;
try
@@ -312,7 +311,7 @@ void Desktop::CreateTemporaryDirectory()
void Desktop::RemoveTemporaryDirectory()
{
- RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::removeTemporaryDirectory" );
+ SAL_INFO( "desktop.app", "desktop (cd100003) ::removeTemporaryDirectory" );
// remove current temporary directory
String &rCurrentTempURL = CurrentTempURL::get();
diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx
index bb9aadb31477..53ee92ea8561 100644
--- a/desktop/source/app/check_ext_deps.cxx
+++ b/desktop/source/app/check_ext_deps.cxx
@@ -22,7 +22,6 @@
#include <rtl/bootstrap.hxx>
#include <rtl/ustring.hxx>
-#include <rtl/logfile.hxx>
#include "cppuhelper/compbase3.hxx"
#include "vcl/wrkwin.hxx"
@@ -246,7 +245,7 @@ static bool impl_checkDependencies( const uno::Reference< uno::XComponentContext
if ( !xExtensionManager.is() )
{
- OSL_FAIL( "Could not get the Extension Manager!" );
+ SAL_WARN( "desktop.app", "Could not get the Extension Manager!" );
return true;
}
@@ -293,7 +292,7 @@ static bool impl_checkDependencies( const uno::Reference< uno::XComponentContext
catch ( const uno::RuntimeException & ) { throw; }
catch (const uno::Exception & exc) {
(void) exc;
- OSL_FAIL( OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_WARN( "desktop.app", "" << exc.Message );
}
if ( bRegistered )
@@ -411,7 +410,7 @@ sal_Bool Desktop::CheckExtensionDependencies()
void Desktop::SynchronizeExtensionRepositories()
{
- RTL_LOGFILE_CONTEXT(aLog,"desktop (jl) ::Desktop::SynchronizeExtensionRepositories");
+ SAL_INFO( "desktop.app", "desktop (jl) ::Desktop::SynchronizeExtensionRepositories");
uno::Reference< uno::XComponentContext > context(
comphelper_getProcessComponentContext());
uno::Reference< ucb::XCommandEnvironment > silent(
diff --git a/desktop/source/offacc/acceptor.cxx b/desktop/source/offacc/acceptor.cxx
index a9b08f476d3a..fd5fbff05ddf 100644
--- a/desktop/source/offacc/acceptor.cxx
+++ b/desktop/source/offacc/acceptor.cxx
@@ -93,16 +93,16 @@ void SAL_CALL Acceptor::run()
{
while ( m_rAcceptor.is() )
{
- RTL_LOGFILE_CONTEXT( aLog, "desktop (lo119109) Acceptor::run" );
+ SAL_INFO( "desktop.offacc", "desktop (lo119109) Acceptor::run" );
try
{
// wait until we get enabled
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109)"\
+ SAL_INFO( "desktop.offacc", "desktop (lo119109)"\
"Acceptor::run waiting for office to come up");
m_cEnable.wait();
if (m_bDying) //see destructor
break;
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109)"\
+ SAL_INFO( "desktop.offacc", "desktop (lo119109)"\
"Acceptor::run now enabled and continuing");
// accept connection
@@ -111,8 +111,7 @@ void SAL_CALL Acceptor::run()
// is destructed so we break out of the run method terminating the thread
if (! rConnection.is()) break;
OUString aDescription = rConnection->getDescription();
- RTL_LOGFILE_CONTEXT_TRACE1( aLog, "desktop (lo119109) Acceptor::run connection %s",
- OUStringToOString(aDescription, RTL_TEXTENCODING_ASCII_US).getStr());
+ SAL_INFO( "desktop.offacc", "desktop (lo119109) Acceptor::run connection " << aDescription );
// create instanceprovider for this connection
Reference< XInstanceProvider > rInstanceProvider(
@@ -125,7 +124,7 @@ void SAL_CALL Acceptor::run()
osl::MutexGuard g(m_aMutex);
m_bridges.add(rBridge);
} catch (const Exception& e) {
- SAL_WARN("desktop", "caught Exception \"" << e.Message << "\"");
+ SAL_WARN("desktop.offacc", "caught Exception \"" << e.Message << "\"");
// connection failed...
// something went wrong during connection setup.
// just wait for a new connection to accept
@@ -139,7 +138,7 @@ void SAL_CALL Acceptor::initialize( const Sequence<Any>& aArguments )
{
// prevent multiple initialization
ClearableMutexGuard aGuard( m_aMutex );
- RTL_LOGFILE_CONTEXT( aLog, "destop (lo119109) Acceptor::initialize()" );
+ SAL_INFO( "desktop.offacc", "destop (lo119109) Acceptor::initialize()" );
sal_Bool bOk = sal_False;
@@ -149,8 +148,7 @@ void SAL_CALL Acceptor::initialize( const Sequence<Any>& aArguments )
// not yet initialized and acceptstring
if (!m_bInit && nArgs > 0 && (aArguments[0] >>= m_aAcceptString))
{
- RTL_LOGFILE_CONTEXT_TRACE1( aLog, "desktop (lo119109) Acceptor::initialize string=%s",
- OUStringToOString(m_aAcceptString, RTL_TEXTENCODING_ASCII_US).getStr());
+ SAL_INFO( "desktop.offacc", "desktop (lo119109) Acceptor::initialize string=" << m_aAcceptString );
// get connect string and protocol from accept string
// "<connectString>;<protocol>"
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index c5bc653460a1..3f63fbe6a3b9 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -30,7 +30,6 @@
#include <com/sun/star/task/XStatusIndicator.hpp>
#include <cppuhelper/implbase2.hxx>
#include <rtl/bootstrap.hxx>
-#include <rtl/logfile.hxx>
#include <rtl/strbuf.hxx>
#include <rtl/math.hxx>
#include <vcl/introwin.hxx>
@@ -207,8 +206,8 @@ void SAL_CALL SplashScreen::setText(const OUString& rText)
void SAL_CALL SplashScreen::setValue(sal_Int32 nValue)
throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT( aLog, "::SplashScreen::setValue (lo119109)" );
- RTL_LOGFILE_CONTEXT_TRACE1( aLog, "value=%d", nValue );
+ SAL_INFO( "desktop.splash", "::SplashScreen::setValue (lo119109)" );
+ SAL_INFO( "desktop.splash", "value=" << nValue );
SolarMutexGuard aSolarGuard;
if (_bVisible && !_bProgressEnd) {