summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sal/inc/rtl/logfile.h8
-rw-r--r--sal/inc/rtl/logfile.hxx11
-rw-r--r--sal/rtl/source/logfile.cxx5
-rwxr-xr-xsal/util/sal.map5
4 files changed, 27 insertions, 2 deletions
diff --git a/sal/inc/rtl/logfile.h b/sal/inc/rtl/logfile.h
index 6c3c64134..f4d92cef6 100644
--- a/sal/inc/rtl/logfile.h
+++ b/sal/inc/rtl/logfile.h
@@ -67,6 +67,14 @@ void SAL_CALL rtl_logfile_trace( const sal_Char* pszFormat, ... );
*/
void SAL_CALL rtl_logfile_longTrace(char const * format, ...);
+/** Return if a log file is written.
+
+ @return true if a log file is written
+
+ @since UDK 3.2.11
+*/
+sal_Bool SAL_CALL rtl_logfile_hasLogFile( void );
+
#ifdef __cplusplus
}
#endif
diff --git a/sal/inc/rtl/logfile.hxx b/sal/inc/rtl/logfile.hxx
index db64ac3b1..db146c0b7 100644
--- a/sal/inc/rtl/logfile.hxx
+++ b/sal/inc/rtl/logfile.hxx
@@ -189,12 +189,19 @@ namespace rtl
#define RTL_LOGFILE_PRODUCT_TRACE( string ) \
rtl_logfile_longTrace( "| : %s\n", string )
-#define RTL_LOGFILE_PRODUCT_CONTEXT( instance, name ) \
- ::rtl::Logfile instance( name )
#define RTL_LOGFILE_PRODUCT_TRACE1( frmt, arg1 ) \
rtl_logfile_longTrace( "| : " ); \
rtl_logfile_trace( frmt, arg1 ); \
rtl_logfile_trace( "\n" )
+#define RTL_LOGFILE_PRODUCT_CONTEXT( instance, name ) \
+ ::rtl::Logfile instance( name )
+#define RTL_LOGFILE_PRODUCT_CONTEXT_TRACE1( instance, frmt, arg1 ) \
+ rtl_logfile_longTrace( "| %s : ", \
+ instance.getName() ); \
+ rtl_logfile_trace( frmt, arg1 ); \
+ rtl_logfile_trace( "\n" )
+#define RTL_LOGFILE_HASLOGFILE() \
+ rtl_logfile_hasLogFile()
#endif
diff --git a/sal/rtl/source/logfile.cxx b/sal/rtl/source/logfile.cxx
index 71fbafb89..8d9c69e2a 100644
--- a/sal/rtl/source/logfile.cxx
+++ b/sal/rtl/source/logfile.cxx
@@ -250,3 +250,8 @@ extern "C" void SAL_CALL rtl_logfile_longTrace(char const * format, ...) {
va_end(args);
}
}
+
+extern "C" sal_Bool SAL_CALL rtl_logfile_hasLogFile( void ) {
+ init();
+ return g_buffer != 0;
+}
diff --git a/sal/util/sal.map b/sal/util/sal.map
index 03af5c114..ad063f379 100755
--- a/sal/util/sal.map
+++ b/sal/util/sal.map
@@ -588,6 +588,11 @@ UDK_3.9 { # OOo 3.1
rtl_math_atanh;
} UDK_3.8;
+UDK_3.10 { # OOo 3.2
+ global:
+ rtl_logfile_hasLogFile;
+} UDK_3.9;
+
PRIVATE_1.0 {
global:
osl_detail_ObjectRegistry_storeAddresses;