diff options
-rw-r--r-- | sal/inc/rtl/logfile.h | 8 | ||||
-rw-r--r-- | sal/inc/rtl/logfile.hxx | 11 | ||||
-rw-r--r-- | sal/rtl/source/logfile.cxx | 5 | ||||
-rwxr-xr-x | sal/util/sal.map | 5 |
4 files changed, 27 insertions, 2 deletions
diff --git a/sal/inc/rtl/logfile.h b/sal/inc/rtl/logfile.h index 232232a4c3ed..66789d92426e 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 7ce33f3ea28a..5eae13b62952 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 9bd0a939513b..476dea11393d 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 03af5c114aa1..ad063f3794d4 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; |