diff options
author | sb <sb@openoffice.org> | 2010-12-14 13:30:07 +0100 |
---|---|---|
committer | sb <sb@openoffice.org> | 2010-12-14 13:30:07 +0100 |
commit | f3aea77133c6e6de2f7dd0cf876a942783200f0c (patch) | |
tree | 31581cda1bee3e8bd38b2ff0c8eca1a5bf2fa4cb /sal/osl/os2 | |
parent | 686f98d534828e4b8f9decba5f0c73d76d249b31 (diff) |
sb135: #i116050# make osl_trace output atomic
Diffstat (limited to 'sal/osl/os2')
-rw-r--r-- | sal/osl/os2/diagnose.c | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/sal/osl/os2/diagnose.c b/sal/osl/os2/diagnose.c index 32e00db76..eabb3eae5 100644 --- a/sal/osl/os2/diagnose.c +++ b/sal/osl/os2/diagnose.c @@ -35,6 +35,8 @@ #include <osl/diagnose.h> #include <osl/thread.h> +#include "printtrace.h" + BYTE oslTraceEnv[] = "OSL_TRACE_TO_FILE"; typedef pfunc_osl_printDebugMessage oslDebugMessageFunc; @@ -53,29 +55,11 @@ void SAL_CALL osl_breakDebug() /************************************************************************/ /* osl_trace */ /************************************************************************/ -/* comment this define to stop output thread identifier*/ -#define OSL_TRACE_THREAD 1 -void SAL_CALL osl_trace ( - const sal_Char* lpszFormat, ...) -{ +void osl_trace(char const * pszFormat, ...) { va_list args; - -#if defined(OSL_PROFILING) - fprintf(stderr, "Time: %06lu : ", osl_getGlobalTimer() ); -#else -#if defined(OSL_TRACE_THREAD) - fprintf(stderr,"Thread: %6d :",osl_getThreadIdentifier(NULL)); -#else - fprintf(stderr, "Trace Message: "); -#endif -#endif - - va_start(args, lpszFormat); - vfprintf(stderr, lpszFormat, args); + va_start(args, pszFormat); + printTrace(0, pszFormat, args); /* TODO: pid */ va_end(args); - - fprintf(stderr,"\n"); - fflush(stderr); } /*----------------------------------------------------------------------------*/ |