summaryrefslogtreecommitdiff
path: root/sal/rtl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-11-22 09:34:46 +0100
committerStephan Bergmann <sbergman@redhat.com>2011-11-22 09:41:47 +0100
commit70a6b9ffbd676a1384433a86205d2cd4f2d4f4b1 (patch)
treeffb31ef817b5f2037cf7c332da422b9179d613d5 /sal/rtl
parentf2972242673cc9608960e9ca70e82766be5275e3 (diff)
New sal/log.h obsoletes osl/diagnose.h and tools/debug.hxx.
* New SAL_INFO..., SAL_WARN... macros. * New SAL_STREAM supersedes OSL_FORMAT. * oustringostreaminserter.hxx moved from unotest to rtl (and always UTF-8 now). * TODO to enable GCC __attribute__((format)) in sal/log.h (requires call-site cleanup). * Further functionality in tools/debug.hxx (DBG_MEMTEST, DBG_CTOR, etc.) not yet addressed. * Some replacements tools String -> rtl::OUString.
Diffstat (limited to 'sal/rtl')
-rw-r--r--sal/rtl/source/logfile.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/sal/rtl/source/logfile.cxx b/sal/rtl/source/logfile.cxx
index f71d8f5be689..c5858c1747b8 100644
--- a/sal/rtl/source/logfile.cxx
+++ b/sal/rtl/source/logfile.cxx
@@ -39,10 +39,12 @@
#include <osl/time.h>
#include <osl/mutex.hxx>
#include <rtl/bootstrap.h>
+#include <rtl/oustringostreaminserter.hxx>
#include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/alloc.h>
#include <rtl/instance.hxx>
+#include <sal/log.h>
#include "osl/thread.h"
#include <algorithm>
@@ -107,7 +109,8 @@ OUString getFileUrl( const OUString &name )
if ( osl_getFileURLFromSystemPath( name.pData, &aRet.pData )
!= osl_File_E_None )
{
- OSL_ASSERT( false );
+ SAL_WARN_S(
+ "sal", "osl_getFileURLFromSystemPath failed for \"" << name << '"');
}
OUString aWorkingDirectory;
@@ -182,7 +185,9 @@ void init() {
}
else
{
- OSL_TRACE( "Couldn't open logfile %s(%d)" , o.getStr(), e );
+ SAL_WARN_S(
+ "sal",
+ "Couldn't open logfile " << o << '(' << e << ')');
}
}
g_bHasBeenCalled = sal_True;