diff options
Diffstat (limited to 'sal/osl/unx/diagnose.c')
-rw-r--r-- | sal/osl/unx/diagnose.c | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/sal/osl/unx/diagnose.c b/sal/osl/unx/diagnose.c index 83f4e90da733..36c9c0d5fec1 100644 --- a/sal/osl/unx/diagnose.c +++ b/sal/osl/unx/diagnose.c @@ -29,7 +29,6 @@ #include "osl/diagnose.h" #include "system.h" - #ifndef HAVE_DLFCN_H #if defined(LINUX) || defined(SOLARIS) @@ -59,6 +58,8 @@ #define INCLUDED_STDDEF_H #endif +#include "printtrace.h" + /************************************************************************/ /* Internal data structures and functions */ /************************************************************************/ @@ -302,33 +303,11 @@ pfunc_osl_printDetailedDebugMessage SAL_CALL osl_setDetailedDebugMessageFunc ( /************************************************************************/ /* 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: %6lu :", - SAL_INT_CAST(unsigned long, osl_getThreadIdentifier(NULL))); -#else - fprintf(stderr, "Trace Message: "); -#endif -#endif - - va_start(args, lpszFormat); - vfprintf(stderr, lpszFormat, args); + va_start(args, pszFormat); + printTrace((unsigned long) getpid(), pszFormat, args); va_end(args); - - fprintf(stderr,"\n"); - fflush(stderr); } -/************************************************************************/ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file |