29#include <osl/thread.h>
33 typedef std::map<OUString, FILE *> TDebugStreamMap;
34 TDebugStreamMap& getStreams()
36 static TDebugStreamMap streams;
41 LogFile::LogFile( JNIEnv* env, jstring streamName,
const char* _pAsciiSuffix )
42 : m_sFileName(StorageContainer::jstring2ustring(
env,streamName) +
43 "." + OUString::createFromAscii( _pAsciiSuffix ) )
48 FILE*& LogFile::getLogFile()
50 FILE*& pLogFile = getStreams()[m_sFileName];
53 OString sByteLogName =
OUStringToOString(m_sFileName,osl_getThreadTextEncoding());
54 pLogFile = fopen( sByteLogName.getStr(),
"a+" );
60 void LogFile::writeString(
const char* _pString,
bool _bEndLine )
62 FILE* pLogFile = getLogFile();
63 fwrite( _pString,
sizeof( *_pString ), strlen( _pString ), pLogFile );
65 fwrite(
"\n",
sizeof( *_pString ), strlen(
"\n" ), pLogFile );
72 fclose( getLogFile() );
const css::uno::Reference< css::xml::crypto::XSecurityEnvironment > & env
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)