23#include <osl/thread.h>
24#include <osl/thread.hxx>
25#include <osl/diagnose.h>
32 using ::com::sun::star::logging::LogRecord;
33 using ::com::sun::star::util::DateTime;
43 OUString getCurrentThreadID()
45 oslThreadIdentifier nThreadID( osl::Thread::getCurrentIdentifier() );
46 return OUString::number(
static_cast<sal_Int64
>(nThreadID) );
51 LogRecord
createLogRecord(
const OUString& _rLoggerName,
const OUString& _rClassName,
52 const OUString& _rMethodName,
const OUString& _rMessage,
53 sal_Int32 _nLogLevel, oslInterlockedCount _nEventNumber )
56 osl_getSystemTime( &aTimeValue );
58 oslDateTime aDateTime;
59 OSL_VERIFY( osl_getDateTimeFromTimeValue( &aTimeValue, &aDateTime ) );
62 aTimeStamp.Year = aDateTime.Year;
63 aTimeStamp.Month = aDateTime.Month;
64 aTimeStamp.Day = aDateTime.Day;
65 aTimeStamp.Hours = aDateTime.Hours;
66 aTimeStamp.Minutes = aDateTime.Minutes;
67 aTimeStamp.Seconds = aDateTime.Seconds;
68 aTimeStamp.NanoSeconds = aDateTime.NanoSeconds;
LogRecord createLogRecord(const OUString &_rLoggerName, const OUString &_rClassName, const OUString &_rMethodName, const OUString &_rMessage, sal_Int32 _nLogLevel, oslInterlockedCount _nEventNumber)